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

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f5f5f5;
    --accent-color: #666;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── NAVIGATION ─────────────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar.scrolled {
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

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

.nav-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px; height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* ─── HERO SLIDESHOW ─────────────────────────────────────────────────────── */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.35);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    font-weight: 300;
    line-height: 1.8;
}

.btn-primary {
    display: inline-block;
    padding: 16px 40px;
    background: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
    border: 2px solid var(--white);
}

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

/* Hero dots */
.hero-dots {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

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

.dot.active { background: var(--white); transform: scale(1.3); }

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

.scroll-indicator span {
    display: block;
    width: 24px; height: 40px;
    border: 2px solid var(--white);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px; left: 50%;
    width: 4px; height: 8px;
    background: var(--white);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0%   { top: 8px;  opacity: 1; }
    50%  { top: 20px; opacity: 0.5; }
    100% { top: 8px;  opacity: 1; }
}

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

/* ─── SECTION HEADER ─────────────────────────────────────────────────────── */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.section-header p {
    font-size: 18px;
    color: var(--accent-color);
}

/* ─── PORTFOLIO ──────────────────────────────────────────────────────────── */
.portfolio {
    padding: 120px 0;
    background: var(--white);
}

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

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 4/5;
}

.portfolio-image {
    width: 100%; height: 100%;
    position: relative;
}

.portfolio-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-item:hover .portfolio-image img { transform: scale(1.1); }

.portfolio-info {
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.portfolio-info h3 { font-size: 28px; margin-bottom: 10px; }
.portfolio-info p  { font-size: 16px; margin-bottom: 15px; opacity: 0.9; }

.view-project {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── GALLERY MODAL ──────────────────────────────────────────────────────── */
.gallery-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
}

.gallery-backdrop.active { display: block; }

.gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2001;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-modal.active { display: flex; }

.gallery-modal-header {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    color: var(--white);
}

.gallery-modal-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.gallery-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: var(--transition);
    border-radius: 4px;
}

.gallery-close:hover { background: rgba(255,255,255,0.15); }

.gallery-modal-body {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 1000px;
}

.gallery-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 65vh;
}

.gallery-image-container img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}

.gallery-arrow {
    background: rgba(255,255,255,0.15);
    border: none;
    color: var(--white);
    font-size: 40px;
    width: 52px; height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    line-height: 1;
}

.gallery-arrow:hover { background: rgba(255,255,255,0.3); }

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-width: 1000px;
    width: 100%;
    padding: 12px 0 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.gallery-thumbnails img {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.55;
    transition: var(--transition);
    flex-shrink: 0;
    border: 2px solid transparent;
}

.gallery-thumbnails img:hover { opacity: 0.85; }
.gallery-thumbnails img.active { opacity: 1; border-color: var(--white); }

.gallery-counter {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* ─── ABOUT ──────────────────────────────────────────────────────────────── */
.about {
    padding: 120px 0;
    background: var(--secondary-color);
}

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

.about-image {
    position: sticky;
    top: 120px;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.about-text h2 { font-size: 48px; margin-bottom: 10px; letter-spacing: -0.5px; }
.about-text h3 { font-size: 24px; color: var(--accent-color); font-weight: 400; margin-bottom: 30px; }
.about-text .lead { font-size: 20px; margin-bottom: 30px; color: var(--accent-color); }
.about-text p { font-size: 17px; line-height: 1.8; margin-bottom: 25px; color: #333; }

.about-skills { margin-top: 40px; padding-top: 40px; border-top: 2px solid #ddd; }
.about-skills h4 { font-size: 20px; margin-bottom: 20px; }

.about-skills ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.about-skills li {
    font-size: 16px; color: #555;
    padding-left: 25px; position: relative;
}

.about-skills li::before {
    content: '→';
    position: absolute; left: 0;
    color: var(--primary-color);
}

/* ─── CONTACT ────────────────────────────────────────────────────────────── */
.contact { padding: 120px 0; background: var(--white); }

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    margin-top: 60px;
}

.contact-info h3 { font-size: 32px; margin-bottom: 20px; }
.contact-info > p { font-size: 18px; color: var(--accent-color); margin-bottom: 40px; }

.contact-details { display: flex; flex-direction: column; gap: 30px; }

.contact-item { display: flex; gap: 20px; align-items: flex-start; }
.contact-item svg { flex-shrink: 0; color: var(--primary-color); margin-top: 2px; }
.contact-item div { display: flex; flex-direction: column; gap: 5px; }
.contact-item strong { font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent-color); }
.contact-item a, .contact-item span { font-size: 17px; color: var(--primary-color); text-decoration: none; transition: var(--transition); }
.contact-item a:hover { color: var(--accent-color); }

.contact-form { background: var(--secondary-color); padding: 50px; border-radius: 8px; }

.form-group { position: relative; margin-bottom: 30px; }

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px 16px 16px 0;
    border: none;
    border-bottom: 2px solid #ddd;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-group label {
    position: absolute;
    left: 0; top: 16px;
    color: var(--accent-color);
    font-size: 16px;
    transition: var(--transition);
    pointer-events: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-bottom-color: var(--primary-color); }

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label,
.form-group select:focus ~ label,
.form-group select:not([value=""]) ~ label {
    top: -8px; font-size: 12px; color: var(--primary-color);
}

.contact-form .btn-primary {
    width: 100%; margin-top: 20px;
    cursor: pointer;
    border: 2px solid var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
}

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

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer p { margin: 5px 0; opacity: 0.8; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 968px) {
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        left: -100%; top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 40px 0;
        gap: 20px;
    }

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

    .hero-title { font-size: 42px; }
    .hero-subtitle { font-size: 18px; }

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

    .about-content { grid-template-columns: 1fr; gap: 40px; }
    .about-image { position: static; }
    .about-skills ul { grid-template-columns: 1fr; }

    .contact-content { grid-template-columns: 1fr; gap: 50px; }
    .contact-form { padding: 30px; }

    .gallery-modal-body { gap: 8px; }
    .gallery-arrow { width: 40px; height: 40px; font-size: 28px; }
}

@media (max-width: 600px) {
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 16px; }
    .section-header h2 { font-size: 32px; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .about-text h2 { font-size: 32px; }
    .contact-form { padding: 25px; }

    .gallery-modal { padding: 12px; }
    .gallery-modal-title { font-size: 18px; }
    .gallery-arrow { display: none; }
    .gallery-thumbnails img { width: 52px; height: 52px; }
}
