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

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

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Light mode colors */
    --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-secondary: rgba(255, 255, 255, 0.1);
    --bg-glass: rgba(255, 255, 255, 0.15);
    --bg-card: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --accent-primary: #ff6b6b;
    --accent-secondary: #4ecdc4;
    --accent-gradient: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    --border-glass: rgba(255, 255, 255, 0.2);
    --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.37);
    --shadow-hover: 0 15px 35px rgba(31, 38, 135, 0.5);
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 100px 0;
    --border-radius: 20px;
    --border-radius-small: 12px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --bg-secondary: rgba(0, 0, 0, 0.3);
    --bg-glass: rgba(0, 0, 0, 0.25);
    --bg-card: rgba(0, 0, 0, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.7);
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== GLASS MORPHISM COMPONENTS ===== */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glass);
    transition: all var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border: none;
    border-radius: var(--border-radius-small);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn::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;
}

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

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: var(--bg-glass);
    transform: translateY(-2px);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 15px 0;
}

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

.nav-logo a {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-normal);
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--text-primary);
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
    width: 100%;
}

.theme-toggle {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

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

.nav-toggle .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all var(--transition-normal);
    border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.7;
    animation: float 6s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #ff6b6b, #feca57);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #4ecdc4, #44a08d);
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.orb-3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, #667eea, #764ba2);
    bottom: 20%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
}

.hero-container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.profile-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

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

.hero-title {
    margin-bottom: 30px;
}

.hero-title .greeting {
    display: block;
    font-size: 24px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.hero-title .name {
    display: block;
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.hero-title .profession {
    display: block;
    font-size: 28px;
    font-weight: 500;
    color: var(--text-primary);
}

.hero-tagline {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: var(--text-secondary);
    position: relative;
    animation: scroll 2s infinite;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(45deg);
}

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

/* ===== SECTIONS ===== */
section {
    padding: var(--section-padding);
    position: relative;
}

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

.section-header h2 {
    font-size: clamp(36px, 6vw, 48px);
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ABOUT SECTION ===== */
.about {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

.about-text h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-primary);
}

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

.about-text .btn {
    margin-top: 30px;
}

.skills-grid h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--text-primary);
}

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

.skill-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-glass);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.skill-icon {
    font-size: 48px;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skill-card h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.skill-rating .stars {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.skill-rating .stars i {
    color: #feca57;
    font-size: 16px;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
    background: var(--bg-primary);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-2px);
}

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

.portfolio-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-normal);
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    aspect-ratio: 4/3;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition-slow);
    filter: brightness(1) contrast(1.1);
}


.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-normal);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.2);
}

.portfolio-info {
    text-align: center;
    color: white;
}

.portfolio-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.portfolio-info p {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.portfolio-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.portfolio-link {
    width: 50px;
    height: 50px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.portfolio-link:hover {
    background: var(--accent-gradient);
    transform: scale(1.1);
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.testimonial-track {
    display: flex;
    transition: transform var(--transition-slow);
}

.testimonial-card {
    min-width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-glass);
}

.testimonial-content .stars {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 30px;
}

.testimonial-content .stars i {
    color: #feca57;
    font-size: 20px;
}

.testimonial-content p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-glass);
}

.author-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.author-info span {
    font-size: 14px;
    color: var(--text-muted);
}

.carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--accent-gradient);
    transform: scale(1.1);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-glass);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.indicator.active {
    background: var(--accent-gradient);
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: var(--bg-primary);
}

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

.contact-info h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow-glass);
    transition: all var(--transition-normal);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.contact-item i {
    font-size: 24px;
    color: var(--accent-primary);
    min-width: 24px;
}

.contact-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.contact-item a,
.contact-item span {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.contact-form {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-glass);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 16px;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.error-message {
    display: block;
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
}

.form-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--border-radius-small);
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-status.success {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    color: #4ecdc4;
}

.form-status.error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 60px 0 40px;
    border-top: 1px solid var(--border-glass);
}

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

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-social a {
    width: 50px;
    height: 50px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.footer-social a:hover {
    background: var(--accent-gradient);
    transform: translateY(-3px);
}

.footer-text p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-text a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all var(--transition-normal);
    position: relative;
    font-weight: 500;
}

.footer-text a:hover {
    color: var(--accent-secondary);
    transform: translateY(-2px);
}

.footer-link {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.footer-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left var(--transition-normal);
    z-index: -1;
}

.footer-link:hover::before {
    left: 100%;
}

.footer-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
    background: var(--bg-glass);
    -webkit-text-fill-color: var(--text-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

@keyframes lightboxZoom {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-glass);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-normal);
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.lightbox-image {
    max-width: 95%;
    max-height: 85vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-caption {
    padding: 20px;
    text-align: center;
    color: var(--text-primary);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 500;
    max-width: 600px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop (4K and above) */
@media (min-width: 1920px) {
    :root {
        --container-max-width: 1400px;
        --section-padding: 120px 0;
    }
    
    .hero-title .name {
        font-size: 56px;
    }
    
    .section-header h2 {
        font-size: 56px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    :root {
        --container-max-width: 960px;
    }
    
    .about-content,
    .contact-content {
        gap: 60px;
    }
    
    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Tablet */
@media (max-width: 968px) {
    :root {
        --section-padding: 80px 0;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right var(--transition-normal);
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta .btn {
        width: 200px;
    }
    
    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    
    .portfolio-filters {
        gap: 15px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .testimonial-author {
        flex-direction: column;
        gap: 15px;
    }
    
    .carousel-controls {
        padding: 0 10px;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --border-radius: 15px;
        --border-radius-small: 10px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero {
        min-height: 90vh;
        padding-top: 80px;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
        margin-bottom: 30px;
    }
    
    .hero-title .greeting {
        font-size: 20px;
    }
    
    .hero-title .name {
        font-size: clamp(28px, 8vw, 36px);
    }
    
    .hero-title .profession {
        font-size: 22px;
    }
    
    .hero-tagline {
        font-size: 18px;
        margin-bottom: 30px;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .section-header h2 {
        font-size: clamp(28px, 8vw, 36px);
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .about-text h3,
    .skills-grid h3,
    .contact-info h3 {
        font-size: 24px;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .skill-card {
        padding: 25px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .testimonial-card {
        padding: 30px 20px;
    }
    
    .testimonial-content p {
        font-size: 16px;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .footer {
        padding: 40px 0 30px;
    }
    
    .footer-social {
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .orb-1 {
        width: 200px;
        height: 200px;
    }
    
    .orb-2 {
        width: 150px;
        height: 150px;
    }
    
    .orb-3 {
        width: 100px;
        height: 100px;
    }
}

/* Mobile Medium */
@media (max-width: 480px) {
    :root {
        --section-padding: 50px 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-logo a {
        font-size: 20px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
    
    .hero-container {
        padding: 0 10px;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .hero-title .name {
        font-size: clamp(24px, 10vw, 32px);
    }
    
    .hero-title .profession {
        font-size: 18px;
    }
    
    .hero-tagline {
        font-size: 16px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .hero-cta .btn {
        width: 180px;
    }
    
    .section-header h2 {
        font-size: clamp(24px, 10vw, 32px);
    }
    
    .about-text h3,
    .skills-grid h3,
    .contact-info h3 {
        font-size: 20px;
    }
    
    .about-text p {
        font-size: 14px;
    }
    
    .skill-card {
        padding: 20px;
    }
    
    .skill-icon {
        font-size: 36px;
    }
    
    .skill-card h4 {
        font-size: 16px;
    }
    
    .portfolio-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .portfolio-info h3 {
        font-size: 20px;
    }
    
    .portfolio-info p {
        font-size: 14px;
    }
    
    .portfolio-link {
        width: 40px;
        height: 40px;
    }
    
    .testimonial-card {
        padding: 25px 15px;
    }
    
    .testimonial-content p {
        font-size: 14px;
    }
    
    .testimonial-author img {
        width: 50px;
        height: 50px;
    }
    
    .author-info h4 {
        font-size: 16px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .contact-item {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .contact-form {
        padding: 25px 15px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px;
        font-size: 14px;
    }
    
    .footer-social a {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    
    .lightbox-caption {
        padding: 15px;
        font-size: 14px;
    }
}

/* Mobile Small */
@media (max-width: 320px) {
    .hero-title .name {
        font-size: 22px;
    }
    
    .hero-title .profession {
        font-size: 16px;
    }
    
    .profile-image {
        width: 100px;
        height: 100px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .hero-cta .btn {
        width: 160px;
    }
    
    .skill-card {
        padding: 15px;
    }
    
    .testimonial-card {
        padding: 20px 10px;
    }
    
    .contact-form {
        padding: 20px 10px;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-image,
    .testimonial-author img,
    .portfolio-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .gradient-orb {
        animation: none;
    }
    
    .scroll-arrow {
        animation: none;
    }
}

/* Print Styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .navbar,
    .back-to-top,
    .lightbox,
    .carousel-controls,
    .portfolio-overlay {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 20px 0;
    }
    
    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .section-header h2 {
        page-break-after: avoid;
    }
    
    .portfolio-grid,
    .skills-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-form {
        display: none;
    }
}
