/* ---------- COMMON CSS FOR ALL PAGES ----------
/* This file contains shared styles used across all pages */

/* ---------- COMMON TRANSITIONS ---------- */
.transition-smooth {
    transition: all 0.3s ease;
}

/* ---------- RESET AND BASE STYLES ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #0a0a0f;
    --secondary-dark: #1a1a2e;
    --accent-purple: #6b46c1;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --gradient-primary: linear-gradient(135deg, #6b46c1 0%, #3b82f6 50%, #06b6d4 100%);
    --gradient-secondary: linear-gradient(135deg, #4c1d95 0%, #1e40af 100%);
    --card-bg: rgba(26, 26, 46, 0.8);
    --border-color: rgba(107, 70, 193, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--primary-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
}

main {
    width: 100%;
    display: block;
}

/* ---------- ANIMATED BACKGROUND ---------- */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f0f23 100%);
    overflow: hidden;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.7;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #6b46c1, #3b82f6);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #06b6d4, #6b46c1);
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    bottom: 10%;
    left: 30%;
    animation-delay: 10s;
}

.shape-4 {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #6b46c1, #06b6d4);
    top: 30%;
    right: 30%;
    animation-delay: 15s;
}

.shape-5 {
    width: 220px;
    height: 220px;
    background: linear-gradient(135deg, #3b82f6, #6b46c1);
    bottom: 20%;
    right: 50%;
    animation-delay: 7s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(50px, -50px) rotate(90deg) scale(1.1);
    }
    50% {
        transform: translate(-30px, 30px) rotate(180deg) scale(0.9);
    }
    75% {
        transform: translate(30px, 50px) rotate(270deg) scale(1.05);
    }
}

/* ---------- NAVIGATION ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.navbar.transition-smooth {
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.nav-link.transition-smooth {
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* ---------- CONTAINER ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---------- SECTION STYLES ---------- */
section {
    padding: 5rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-divider {
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
    animation: expandWidth 1s ease-out;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100px;
    }
}

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

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-left {
    animation: slideInLeft 1s ease-out;
}

.hero-right {
    animation: slideInRight 1s ease-out;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* ---------- HERO ICONS (MAIN LARGE ICONS) ---------- */
.hero-visual .camera-icon,
.hero-visual .code-window,
.hero-visual .design-icon,
.hero-visual .book-icon,
.hero-visual .contact-icon {
    width: 350px;
    height: 350px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: white;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 20px 40px rgba(107, 70, 193, 0.3);
}

/* Ensure contact icon specifically gets the right size */
.hero-visual .contact-icon {
    width: 350px !important;
    height: 350px !important;
    font-size: 6rem !important;
}

/* Specific styling for code window */
.code-window {
    background: var(--primary-dark);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    flex-direction: column;
    padding: 0;
}

.code-window .window-header {
    background: var(--secondary-dark);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.code-window .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-window .dot.red { background: #ff5f56; }
.code-window .dot.yellow { background: #ffbd2e; }
.code-window .dot.green { background: #27c93f; }

.code-window .code-content {
    padding: 2rem;
    font-family: 'Courier New', monospace;
    color: var(--accent-cyan);
    font-size: 1rem;
    text-align: left;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.greeting {
    display: block;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.name {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(30deg);
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-purple);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.4);
}

.btn-secondary:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
}

/* ---------- BUTTONS ---------- */

/* ---------- PROFILE CIRCLE ---------- */
.profile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.profile-circle {
    position: relative;
    width: 350px;
    height: 350px;
    animation: pulse 2s ease-in-out infinite;
}

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

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 2;
    border: 5px solid var(--accent-purple);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent-cyan);
    border-right-color: var(--accent-blue);
    animation: rotate 3s linear infinite;
    z-index: 1;
}

.profile-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(107, 70, 193, 0.3) 0%, transparent 70%);
    animation: glow 2s ease-in-out infinite alternate;
    z-index: 0;
}

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

@keyframes glow {
    from {
        opacity: 0.5;
        transform: scale(1);
    }
    to {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* ---------- ABOUT SECTION ---------- */
.about {
    background: rgba(26, 26, 46, 0.3);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-purple);
}

.about-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* ---------- SKILLS ---------- */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    color: var(--text-primary);
    font-weight: 500;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0;
    transition: width 2s ease-out;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.8;
    }
}

/* ---------- EDUCATION & EXPERIENCE ---------- */
.education-item,
.experience-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.education-item:last-child,
.experience-item:last-child {
    border-bottom: none;
}

.education-item h4,
.experience-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.education-item p,
.experience-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ---------- PROJECTS SECTION ---------- */
.projects {
    background: rgba(15, 15, 35, 0.5);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.project-image {
    width: 100%;
    height: 200px;
    background: var(--gradient-secondary);
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

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

.tech-tag {
    background: rgba(107, 70, 193, 0.2);
    color: var(--accent-cyan);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(107, 70, 193, 0.3);
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--accent-purple);
    transform: translateX(5px);
}

/* ---------- CONTACT SECTION ---------- */
.contact {
    background: rgba(26, 26, 46, 0.3);
}

/* ---------- FORM STYLING ---------- */
.contact-form-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-form-container:hover::before {
    transform: scaleX(1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.form-label i {
    color: var(--accent-cyan);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(10, 10, 15, 0.6);
    border: 2px solid rgba(107, 70, 193, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-input:focus {
    border-color: var(--accent-purple);
    background: rgba(10, 10, 15, 0.8);
    box-shadow: 0 0 0 4px rgba(107, 70, 193, 0.1), 0 0 20px rgba(107, 70, 193, 0.2);
    transform: translateY(-2px);
}

.form-input:hover {
    border-color: rgba(107, 70, 193, 0.4);
    background: rgba(10, 10, 15, 0.7);
}

/* Select dropdown styling - simplified */
select.form-input {
    cursor: pointer;
    background: rgba(10, 10, 15, 0.6);
    border: 2px solid rgba(107, 70, 193, 0.2);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

select.form-input:focus {
    border-color: var(--accent-purple);
    background: rgba(10, 10, 15, 0.8);
    box-shadow: 0 0 0 4px rgba(107, 70, 193, 0.1), 0 0 20px rgba(107, 70, 193, 0.2);
    transform: translateY(-2px);
}

select.form-input:hover {
    border-color: rgba(107, 70, 193, 0.4);
    background: rgba(10, 10, 15, 0.7);
}

/* Textarea specific styling */
textarea.form-input {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Button styling for form */
.btn-full {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.btn-full::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: left 0.5s ease;
}

.btn-full:hover::before {
    left: 100%;
}

/* Form validation states */
.form-input:valid {
    border-color: rgba(6, 182, 212, 0.4);
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

/* Animated form labels */
.form-group {
    position: relative;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    transform: translateY(-25px);
    font-size: 0.85rem;
    color: var(--accent-cyan);
}

/* Form submission animation */
@keyframes formSubmit {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.contact-form:has(button[type="submit"]:active) {
    animation: formSubmit 0.3s ease;
}

/* Prominent notification overlay */
.notification-overlay {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 500px;
    width: 90%;
    padding: 1.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.notification-overlay.show {
    opacity: 1;
    visibility: visible;
    animation: slideDown 0.5s ease;
}

.notification-overlay.success {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.9), rgba(107, 70, 193, 0.9));
    border: 2px solid rgba(6, 182, 212, 0.5);
    color: white;
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.4);
}

.notification-overlay.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
    border: 2px solid rgba(239, 68, 68, 0.5);
    color: white;
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.4);
}

.notification-overlay .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.notification-overlay .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Form message styling (fallback) */
.form-success {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(107, 70, 193, 0.1));
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    padding: 1rem;
    color: var(--accent-cyan);
    text-align: center;
    margin-top: 1rem;
    animation: fadeInUp 0.5s ease;
    font-weight: 500;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.form-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 1rem;
    color: #f87171;
    text-align: center;
    margin-top: 1rem;
    animation: shake 0.5s ease;
    font-weight: 500;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Enhanced accessibility and micro-interactions */
.form-input:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
    border-color: var(--accent-cyan);
}

/* Loading state for submit button */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

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

/* Enhanced hover effects */
.form-group:hover .form-label {
    color: var(--accent-cyan);
    transform: translateX(5px);
}

/* Progress indicator for form completion */
.form-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.form-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    width: 0;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(107, 70, 193, 0.5);
}

/* Character counter for textarea */
.form-char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    transition: color 0.3s ease;
}

.form-char-counter.warning {
    color: var(--accent-cyan);
}

.form-char-counter.danger {
    color: #f87171;
}

/* Enhanced select dropdown */
select.form-input option {
    background: var(--secondary-dark);
    color: var(--text-primary);
    padding: 0.5rem;
}


/* Focus trap for form modal */
.form-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.form-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.form-modal {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.form-modal-backdrop.active .form-modal {
    transform: scale(1);
}

/* Smooth scroll to form on validation error */
.form-error-scroll {
    scroll-behavior: smooth;
    scroll-margin-top: 100px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3,
.social-links h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.contact-method:hover {
    transform: translateX(10px);
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-lg);
}

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

.contact-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.contact-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.social-link:hover {
    transform: translateY(-5px);
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-lg);
}

.social-link i {
    font-size: 1.25rem;
    color: var(--accent-cyan);
    flex-shrink: 0;
    min-width: 1.25rem;
}

.social-link span {
    font-weight: 500;
}

/* ---------- FOOTER ---------- */
.footer {
    background: var(--primary-dark);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
}

.footer i {
    color: var(--accent-purple);
    animation: heartbeat 1.5s ease-in-out infinite;
}

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

/* ---------- BACK TO TOP BUTTON ---------- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ---------- LOADING ANIMATION ---------- */
.loading {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- SCROLLBAR STYLING ---------- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* ---------- SELECTION STYLING ---------- */
::selection {
    background: var(--accent-purple);
    color: white;
}

/* ---------- FOCUS STYLES ---------- */
.btn:focus,
.nav-link:focus,
.contact-method:focus,
.social-link:focus {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* ---------- GALLERY STYLES (FOR PHOTOGRAPHY PAGE) ---------- */
.gallery {
    padding: 6rem 0;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--accent-purple);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 70, 193, 0.3);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out both;
}

.gallery-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center;
}

/* ---------- WEBSITE SHOWCASE STYLES ---------- */
.website-showcase {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.browser-window {
    width: 280px;
    height: 200px;
    background: rgba(10, 10, 15, 0.9);
    border: 2px solid rgba(107, 70, 193, 0.3);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    animation: float 6s ease-in-out infinite;
    position: relative;
}

.browser-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.browser-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control.close {
    background: #ff5f57;
}

.control.minimize {
    background: #ffbd2e;
}

.control.maximize {
    background: #28ca42;
}

.control:hover {
    transform: scale(1.2);
}

.browser-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.browser-address i {
    color: var(--accent-cyan);
}

.browser-content {
    padding: 1rem;
    height: calc(100% - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.website-preview {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(107, 70, 193, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
}

.preview-header {
    margin-bottom: 0.75rem;
}

.preview-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.nav-item {
    width: 20px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-item.active {
    background: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.preview-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.content-block {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    height: 8px;
    transition: all 0.3s ease;
}

.content-block.medium {
    width: 80%;
    background: rgba(107, 70, 193, 0.2);
}

.content-block.small {
    width: 60%;
    background: rgba(6, 182, 212, 0.2);
}

.floating-elements {
    position: absolute;
    top: -20px;
    right: -30px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.float-element {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

.float-element:nth-child(2) {
    animation-delay: 1s;
}

.float-element:nth-child(3) {
    animation-delay: 2s;
}

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

/* ---------- RESPONSIVE DESIGN ---------- */
@media (max-width: 768px) {
    /* Hero Section Mobile */
    .hero {
        min-height: 100vh;
        padding-top: 80px;
        padding-bottom: 1rem;
        display: flex;
        align-items: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 0 1rem;
        max-width: 100%;
    }

    .hero-left {
        order: 2;
    }

    .hero-right {
        order: 1;
        display: flex;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .browser-window {
        width: 240px;
        height: 160px;
    }

    .floating-elements {
        position: static;
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .float-element {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.1;
        margin-bottom: 0.75rem;
    }

    .greeting {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }

    .profile-circle {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }

    .hero-visual .camera-icon,
    .hero-visual .code-window,
    .hero-visual .design-icon,
    .hero-visual .book-icon,
    .hero-visual .contact-icon {
        width: 200px;
        height: 200px;
        font-size: 3rem;
    }

    /* Ensure contact icon mobile size */
    .hero-visual .contact-icon {
        width: 200px !important;
        height: 200px !important;
        font-size: 3rem !important;
    }

    /* Navigation Mobile */
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        transition: right 0.3s ease;
        gap: 2rem;
    }

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

    .nav-link {
        font-size: 1.2rem;
        padding: 1rem 2rem;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

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

    /* Buttons Mobile */
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        min-width: 130px;
        min-height: 44px;
        touch-action: manipulation;
    }

    /* Section Mobile */
    section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    /* About Section Mobile */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .about-card {
        padding: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .about-card h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .skill-item {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .skill-name {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }

    .skill-bar {
        height: 6px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
        overflow: hidden;
    }

    /* Projects Section Mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .project-card {
        margin-bottom: 0.5rem;
    }

    .project-image {
        height: 180px;
    }

    .project-content {
        padding: 1.25rem;
    }

    .project-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .project-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.5;
    }

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

    .tech-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
        border-radius: 12px;
    }

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

    .project-link {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        min-height: 40px;
        display: flex;
        align-items: center;
        touch-action: manipulation;
    }

    /* Contact Section Mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Form Mobile Styles */
    .contact-form-container {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .form-group {
        gap: 0.75rem;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .form-input {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
        border-radius: 10px;
        min-height: 48px;
        touch-action: manipulation;
    }

    
    textarea.form-input {
        min-height: 100px;
        padding: 0.875rem 1rem;
        line-height: 1.5;
    }

    .btn-full {
        min-height: 48px;
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }

    .form-success,
    .form-error {
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    .contact-info h3,
    .social-links h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .contact-info p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }

    .contact-methods {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .contact-method {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        min-height: auto;
        touch-action: manipulation;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .contact-details h4 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .contact-details p {
        font-size: 0.875rem;
        color: var(--text-secondary);
    }

    .social-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
        overflow: hidden;
    }

    .social-link {
        padding: 0.875rem;
        justify-content: center;
        text-align: center;
        min-height: 48px;
        touch-action: manipulation;
        width: 100%;
        box-sizing: border-box;
    }

    .social-link i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .social-link span {
        font-size: 0.875rem;
    }

    /* Footer Mobile */
    .footer {
        padding: 1.5rem 0;
    }

    .footer p {
        font-size: 0.875rem;
        text-align: center;
    }

    /* Back to Top Mobile */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1rem;
        right: 1rem;
        font-size: 1rem;
    }

    /* Gallery Mobile */
    .gallery-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-item {
        border-radius: 15px;
    }

    .gallery-image-container {
        height: 250px;
    }
}

/* ---------- TOUCH OPTIMIZATIONS ---------- */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .contact-method,
    .social-link {
        min-height: 48px;
        touch-action: manipulation;
    }
    
    input, textarea, select {
        font-size: 16px;
    }
    
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    @media (hover: none) {
        .btn:hover,
        .nav-link:hover,
        .contact-method:hover,
        .social-link:hover,
        .project-card:hover,
        .about-card:hover {
            transform: none;
        }
        
        .btn:active,
        .nav-link:active,
        .contact-method:active,
        .social-link:active {
            transform: scale(0.95);
        }
    }
}

/* ---------- FOCUS STYLES FOR MOBILE ---------- */
@media (max-width: 768px) {
    .btn:focus,
    .nav-link:focus,
    .contact-method:focus,
    .social-link:focus {
        outline: 3px solid var(--accent-cyan);
        outline-offset: 2px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .profile-circle {
        width: 160px;
        height: 160px;
    }

    .hero-visual .camera-icon,
    .hero-visual .code-window,
    .hero-visual .design-icon,
    .hero-visual .book-icon,
    .hero-visual .contact-icon {
        width: 160px;
        height: 160px;
        font-size: 2.5rem;
    }

    /* Ensure contact icon small mobile size */
    .hero-visual .contact-icon {
        width: 160px !important;
        height: 160px !important;
        font-size: 2.5rem !important;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .gallery-image-container {
        height: 220px;
    }

    .gallery-filters {
        justify-content: center;
    }

    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .nav-menu {
        font-size: 0.9rem;
    }
}
