/* ========================================
   Preloader / Loading Animation
   ======================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 30px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loader-logo span {
    color: var(--secondary-color);
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary-color);
    border-right-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.loader-text {
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: 2px;
}

/* ========================================
   CSS Variables - Pure Black + Neon Blue
   ======================================== */
:root {
    --primary-color: #00ffff;
    --primary-dark: #1e90ff;
    --secondary-color: #ff00ff;
    --accent-color: #00ffff;
    --background: #000000;
    --background-secondary: #0a0a0a;
    --surface: #111111;
    --surface-hover: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border: #222222;
    --shadow: 0 4px 6px -1px rgba(0, 255, 255, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 255, 255, 0.15);
    --gradient: linear-gradient(135deg, #00ffff 0%, #ff00ff 100%);
    --code-bg: #0a0a0a;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
    opacity: 0;
    animation: fadeInPage 0.8s ease forwards;
}

/* Glow effects */
h1, h2, h3 {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3), 0 0 20px rgba(0, 255, 255, 0.2);
}

.section-title {
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.3);
}

.name {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
    opacity: 0;
    animation: fadeInPage 0.8s ease forwards;
}

@keyframes fadeInPage {
    from { opacity: 0; }
    to { opacity: 1; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

/* ========================================
   Page Transitions
   ======================================== */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Section Styles
   ======================================== */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
}

.logo span {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--text-primary);
    transition: var(--transition);
    padding: 8px;
    border-radius: 50%;
}

.theme-toggle:hover {
    transform: rotate(15deg);
    background: var(--surface-hover);
}

/* ========================================
   Hero Section (Home)
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 20px 80px;
    background: transparent !important;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 0;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-text {
    animation: slideInLeft 0.8s ease;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.greeting {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
    display: block;
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.name {
    font-size: 4rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
}

.headline {
    font-size: 1.9rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-weight: 500;
    animation: fadeInUp 0.6s ease 0.4s forwards;
    opacity: 0;
}

/* Typing Animation */
.typing-text {
    display: inline;
    overflow: hidden;
    white-space: nowrap;
}

.typing-text-2 {
    display: inline;
    overflow: hidden;
    white-space: nowrap;
}

.typing-cursor {
    display: inline-block;
    animation: blink 0.7s step-end infinite;
    color: var(--primary-color);
    font-weight: bold;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes typing2 {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.hero-bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 520px;
    animation: fadeInUp 0.6s ease 0.5s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
    animation: fadeInUp 0.6s ease 0.6s forwards;
    opacity: 0;
}

.social-links {
    display: flex;
    gap: 15px;
    animation: fadeInUp 0.6s ease 0.7s forwards;
    opacity: 0;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-5px) scale(1.1);
}

/* Profile Image */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInRight 0.8s ease;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.profile-frame {
    width: 100%;
    max-width: 550px;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 5px var(--primary-color), 0 0 0 10px var(--surface-hover);
    margin: 0 auto;
    animation: profileShake 3s ease-in-out infinite;
    transition: var(--transition);
}

.profile-link {
    display: block;
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
}

.profile-frame:hover {
    animation: none;
    transform: scale(1.05);
    box-shadow: 0 0 0 5px var(--primary-color), 0 0 0 10px var(--secondary-color), 0 20px 40px rgba(0,0,0,0.2);
}

.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes profileShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    2% { transform: translateX(-3px) rotate(-1deg); }
    4% { transform: translateX(3px) rotate(1deg); }
    6% { transform: translateX(-2px) rotate(0deg); }
    8% { transform: translateX(2px) rotate(1deg); }
    10% { transform: translateX(0) rotate(0deg); }
    92% { transform: translateX(0) rotate(0deg); }
    94% { transform: translateX(-3px) rotate(-1deg); }
    96% { transform: translateX(3px) rotate(1deg); }
    98% { transform: translateX(0) rotate(0deg); }
}

.profile-decoration {
    display: none;
}

/* ========================================
   About Page
   ======================================== */
.page-header {
    padding: 140px 0 60px;
    background: transparent !important;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header .container {
    position: relative;
    z-index: 10;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.about-section {
    padding: 100px 0;
    background: transparent !important;
}

.about-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 60px;
    align-items: start;
}

.about-image {
    position: relative;
}

.about-img-frame {
    width: 100%;
    max-width: 550px;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 5px var(--primary-color), 0 0 0 10px var(--surface-hover);
    margin: 0 auto;
    animation: profileShake 3s ease-in-out infinite;
    transition: var(--transition);
}

.about-img-frame:hover {
    animation: none;
    transform: scale(1.05);
}

.about-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-decor {
    display: none;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.personal-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
    padding: 30px;
    background: var(--surface);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-item i {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.info-item span {
    font-weight: 500;
}

.info-item small {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========================================
   Skills Page
   ======================================== */
.skills-section {
    padding: 100px 0;
    background: transparent !important;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.skills-category {
    background: var(--surface);
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.skills-category:nth-child(1) { animation-delay: 0.1s; }
.skills-category:nth-child(2) { animation-delay: 0.2s; }
.skills-category:nth-child(3) { animation-delay: 0.3s; }
.skills-category:nth-child(4) { animation-delay: 0.4s; }

.skills-category:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.skills-category h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.skills-category h3 i {
    width: 45px;
    height: 45px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.skill-item {
    margin-bottom: 22px;
}

.skill-item:last-child {
    margin-bottom: 0;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 500;
}

.skill-percent {
    color: var(--primary-color);
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--surface-hover);
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease;
}

/* ========================================
   Projects Page
   ======================================== */
.projects-section {
    padding: 100px 0;
    background: transparent !important;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
}

.project-card {
    background: var(--surface);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

.project-img {
    height: 220px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.project-img::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.project-card:hover .project-img::before {
    transform: translateX(100%);
}

.project-content {
    padding: 30px;
}

.project-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.project-content > p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.project-features {
    margin-bottom: 25px;
}

.project-features li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-features i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

.project-links {
    display: flex;
    gap: 12px;
}

.btn-small {
    padding: 10px 22px;
    font-size: 0.9rem;
}

/* ========================================
   Services Page
   ======================================== */
.services-section {
    padding: 100px 0;
    background: transparent !important;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--surface);
    padding: 45px 35px;
    border-radius: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.15s; }
.service-card:nth-child(3) { animation-delay: 0.2s; }
.service-card:nth-child(4) { animation-delay: 0.25s; }
.service-card:nth-child(5) { animation-delay: 0.3s; }
.service-card:nth-child(6) { animation-delay: 0.35s; }

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.service-icon {
    width: 85px;
    height: 85px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.2rem;
    color: white;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   Contact Page
   ======================================== */
.contact-section {
    padding: 100px 0;
    background: transparent !important;
    position: relative;
}

.contact-section .container {
    position: relative;
    z-index: 10;
}

/* ========================================
   Gallery Section (in-page styles)
   ======================================== */
.gallery-section {
    padding: 100px 0;
    background: transparent !important;
    position: relative;
}


.gallery-section .container {
    position: relative;
    z-index: 10;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    padding: 28px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.6s ease forwards;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }
.contact-item:nth-child(4) { animation-delay: 0.4s; }

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 500;
}

.contact-details p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-form-wrapper {
    background: var(--surface);
    padding: 45px;
    border-radius: 25px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateX(30px);
    animation: slideInRight 0.6s ease forwards;
    animation-delay: 0.3s;
}

.contact-form-wrapper h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.contact-form-wrapper > p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 22px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--background);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 50px 0 25px;
    background: transparent !important;
    color: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 35px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo a {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
}

.footer-logo span {
    color: var(--secondary-color);
}

.footer-logo p {
    color: var(--text-muted);
    margin-top: 8px;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    font-size: 1.1rem;
}

.footer-social a:hover {
    background: var(--gradient);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   Scroll Down Arrow
   ======================================== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    color: var(--primary-color);
    font-size: 2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-12px); }
    60% { transform: translateX(-50%) translateY(-6px); }
}

/* ========================================
   Responsive Design - Fix for All Devices
   ======================================== */

/* Large Desktop */
@media (max-width: 1400px) {
    .container {
        max-width: 1100px;
    }
}

/* Laptop & Small Desktop */
@media (max-width: 1200px) {
    .container {
        max-width: 950px;
    }
    
    .hero-content {
        gap: 40px;
    }
    
    .profile-frame {
        max-width: 500px;
    }
    
    .profile-link {
        max-width: 500px;
    }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
    .container {
        max-width: 90%;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 100px 20px 60px;
    }
    
    .hero-text {
        order: 2;
    }
    
    .hero-image {
        order: 1;
    }
    
    .profile-frame {
        margin: 0 auto;
        max-width: 450px;
        width: 80%;
    }
    
    .profile-link {
        max-width: 450px;
        width: 80%;
        margin: 0 auto;
    }
    
    .hero-bio {
        margin: 0 auto 35px;
    }
    
    .hero-buttons, .social-links {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-img-frame {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .name {
        font-size: 2.6rem;
    }
    
    .headline {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 35px;
    }
    
    .greeting {
        font-size: 1.1rem;
    }
    
    .personal-info {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        padding: 15px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 30px 25px;
    }
    
    .projects-grid {
        gap: 25px;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .project-links {
        flex-wrap: wrap;
    }
    
    .contact-item {
        padding: 20px;
    }
    
    .contact-form-wrapper {
        padding: 30px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .page-header {
        padding: 120px 0 50px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .skills-category {
        padding: 25px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Large Mobile */
@media (max-width: 540px) {
    .container {
        padding: 0 15px;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .headline {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 25px;
    }
    
    .social-links {
        gap: 12px;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
    }
    
    .profile-frame {
        max-width: 380px;
    }
    
    .profile-link {
        max-width: 380px;
    }
    
    .about-img-frame {
        max-width: 450px;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
    
    .project-card h3 {
        font-size: 1.3rem;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
    }
    
    .contact-form-wrapper h3 {
        font-size: 1.4rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 14px 18px;
    }
}

/* Small Mobile */
@media (max-width: 380px) {
    .name {
        font-size: 1.7rem;
    }
    
    .headline {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .profile-frame {
        max-width: 300px;
    }
    
    .profile-link {
        max-width: 300px;
    }
    
    .about-img-frame {
        max-width: 350px;
    }
    
    .skills-category h3 {
        font-size: 1.2rem;
    }
    
    .skill-info span {
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        gap: 10px;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }
}

/* Extra Small */
@media (max-width: 320px) {
    .name {
        font-size: 1.5rem;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
}

/* ========================================
   Mobile Menu Base Styles
   ======================================== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 320px;
    height: 100vh;
    background: var(--surface);
    z-index: 999;
    padding: 100px 30px 30px;
    transition: right 0.4s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu li {
    border-bottom: 1px solid var(--border);
}

.mobile-menu a {
    display: block;
    padding: 18px 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--primary-color);
    padding-left: 25px;
    background: var(--surface-hover);
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    margin-right: -10px;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   Mobile Menu - Show on Small Devices
   ======================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .mobile-menu {
        right: -100%;
    }
    
    .mobile-menu.active {
        right: 0;
    }
}

/* ========================================
   Custom Cursor
   ======================================== */
.custom-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-cursor.visible {
    opacity: 1;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: #00ffff;
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    box-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

.cursor-ring {
    width: 40px;
    height: 40px;
    border: 2px solid #00ffff;
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease-out;
    opacity: 0.5;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.custom-cursor.enlarged .cursor-dot {
    transform: translate(-50%, -50%) scale(1.5);
    box-shadow: 0 0 15px #00ffff, 0 0 30px #00ffff;
}

.custom-cursor.enlarged .cursor-ring {
    width: 60px;
    height: 60px;
    border-color: #ff00ff;
    opacity: 0.3;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.custom-cursor.clicked .cursor-ring {
    transform: translate(-50%, -50%) scale(0.8);
}

/* Hide default cursor on desktop */
@media (min-width: 1024px) {
    body {
        cursor: none;
    }
    
    .custom-cursor {
        display: block;
    }
    
    a, button, .btn, input, textarea, .project-card, .service-card, .skill-item, .gallery-item {
        cursor: none;
    }
}

/* ========================================
   Three.js Space Background
   ======================================== */
#space-bg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1 !important;
    pointer-events: none;
}

#space-bg canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.galaxy-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 70%, rgba(0,0,0,0.9) 100%);
    pointer-events: none;
    z-index: 1;
}

.galaxy-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Content sections should be above the background */
section, .page-header, .hero, .about-section, .skills-section, .projects-section, .services-section, .contact-section, .gallery-section {
    position: relative;
    z-index: 10;
}

.space-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.4) 0%,
        rgba(15, 23, 42, 0.1) 50%,
        transparent 100%
    );
    pointer-events: none;
}

/* Make hero section work with space background */
.hero {
    position: relative;
    overflow: hidden;
}

/* ========================================
   Particle Canvas (fallback if Three.js fails)
   ======================================== */
.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ========================================
   Navbar Scrolled State
   ======================================== */
.navbar.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-lg);
}

.navbar.scrolled .nav-container {
    padding: 10px 20px;
}

/* ========================================
   Counter Statistics
   ======================================== */
.counter {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Stats Section
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-item h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========================================
   Enhanced Card Hover Effects
   ======================================== */
.project-card, .service-card, .skill-item, .gallery-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.project-card::before, .service-card::before, .skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.project-card:hover, .service-card:hover, .skill-item:hover {
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Hero Background Enhancement
   ======================================== */
.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 40%;
    height: 60%;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-radius: 50%;
    z-index: 0;
    animation: pulseGlow2 10s ease-in-out infinite;
}

@keyframes pulseGlow2 {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.6; }
}

/* ========================================
   Scroll Indicator Enhancement
   ======================================== */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.scroll-indicator a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--surface);
    border-radius: 50%;
    box-shadow: var(--shadow);
    animation: bounce 2s infinite;
    transition: var(--transition);
}

.scroll-indicator a:hover {
    background: var(--gradient);
    color: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ========================================
   Loading Enhancement
   ======================================== */
.loader-content {
    position: relative;
}

.loader-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: var(--gradient);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    filter: blur(30px);
    opacity: 0.5;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ========================================
   Social Links Enhancement
   ======================================== */
.social-links {
    position: relative;
}

.social-link {
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    transition: left 0.3s ease;
    z-index: -1;
}

.social-link:hover::before {
    left: 0;
}

/* ========================================
   Button Ripple Effect
   ======================================== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   Gradient Text Animation
   ======================================== */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========================================
   Enhanced Focus States
   ======================================== */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .preloader,
    .custom-cursor,
    .particle-canvas,
    .scroll-indicator {
        display: none !important;
    }
}
