/* 
 * Portfolio Stylesheet
 * Airbnb Production Standard Design Language
 */

:root {
    /* Color Palette - Light Mode (Default) */
    --bg-color: #ffffff;
    --surface-color: #ffffff;
    --text-primary: #222222;
    --text-secondary: #717171;
    --border-color: #dddddd;
    --border-light: #ebebeb;
    --primary-color: #ff385c; /* Airbnb signature red/pink */
    --primary-hover: #e31c5f;
    --hover-bg: #f7f7f7;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Shadows - Airbnb Style Floating Elevation */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 6px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.12);
    --shadow-hover: 0 8px 28px rgba(0,0,0,0.16);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 500px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Spacing */
    --section-padding: 96px 24px;
    --container-max: 1200px;
}

[data-theme="dark"] {
    /* Color Palette - Dark Mode */
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --text-primary: #f7f7f7;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
    --border-light: #2a2a2a;
    --primary-color: #ff385c;
    --primary-hover: #ff5a79;
    --hover-bg: #2a2a2a;
    
    /* Shadows for Dark Mode (Slightly stronger to be visible) */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --shadow-md: 0 6px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 14px 28px rgba(0,0,0,0.4), 0 10px 10px rgba(0,0,0,0.3);
    --shadow-hover: 0 8px 28px rgba(0,0,0,0.5);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

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

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

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 1rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1), background-color var(--transition-fast);
    text-decoration: none;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

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

.btn-blue {
    background-color: #3b82f6;
    color: #ffffff;
    border: 1px solid #3b82f6;
}

.btn-blue:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

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

.btn-secondary:hover {
    background-color: var(--hover-bg);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.logo span {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
}

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

.mobile-menu-btn {
    display: none;
    color: var(--text-primary);
}

/* Theme Toggle Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 30px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: var(--border-color);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}

.slider .sun-icon {
    width: 14px;
    height: 14px;
    color: #f39c12;
    z-index: 1;
}

.slider .moon-icon {
    width: 14px;
    height: 14px;
    color: #f1c40f;
    z-index: 1;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 22px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 22px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Sections Global */
section {
    padding: var(--section-padding);
}

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

/* About Section */
.about-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px; /* offset for fixed header */
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
}

.about-content {
    flex: 1;
    max-width: 600px;
}

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

.highlight {
    color: var(--primary-color);
}

.hero-subtitle {
    margin-bottom: 40px;
    font-size: 1.25rem;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

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

.hero-avatar {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
}

/* Projects Section */
.projects-section {
    background-color: var(--hover-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: 32px;
}

.project-card {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
}

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

.project-image {
    width: 100%;
    padding-top: 60%; /* 5:3 Aspect Ratio */
    background-color: var(--border-light);
    position: relative;
}

/* Carousel Styles */
.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform var(--transition-normal);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast), background-color var(--transition-fast);
    z-index: 2;
}

.carousel:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev-btn {
    left: 8px;
}

.carousel-btn.next-btn {
    right: 8px;
}

.carousel-btn svg {
    width: 16px;
    height: 16px;
}

.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.indicator.active {
    background-color: rgba(255, 255, 255, 1);
}

/* Gradient placeholders for project images */
.project-img-2 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.project-img-3 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }

.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-category {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.project-desc {
    font-size: 1rem;
    margin-bottom: 24px;
    flex: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

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

/* Tech Stack Pills */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tech-pill {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background-color: var(--hover-bg);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.tech-pill:hover {
    background-color: var(--surface-color);
    border-color: var(--primary-color);
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.testimonial-card {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-normal);
}

.testimonial-card:hover {
    box-shadow: var(--shadow-md);
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.testimonial-stars svg {
    width: 16px;
    height: 16px;
}

.testimonial-text {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--border-light);
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.author-info span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Contact Section */
.contact-section {
    background-color: var(--hover-bg);
}

.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
}

.contact-info p {
    font-size: 1.25rem;
    margin-bottom: 32px;
}

.social-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), color var(--transition-fast), border-color var(--transition-fast);
}

.social-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    padding: 40px 24px;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-container {
        flex-direction: column;
        text-align: center;
    }
    
    .about-content {
        max-width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
}

@media (max-width: 768px) {
    :root {
        --section-padding: 64px 24px;
    }
    
    .nav-links {
        display: none; /* Hide on mobile, would need JS to toggle */
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .theme-switch-wrapper {
        display: none; /* Can be moved into mobile menu */
    }
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.lightbox-modal.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.lightbox-modal.show .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    z-index: 1002;
}

.lightbox-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-btn svg {
    width: 24px;
    height: 24px;
}
