/* ==========================================================================
   CARDOZ - Clean Minimalist Portfolio
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESET & BASE
   -------------------------------------------------------------------------- */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: #000;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

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

/* --------------------------------------------------------------------------
   2. TYPOGRAPHY
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.125rem;
}

p {
    margin-bottom: 1.5rem;
}

p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   3. LAYOUT
   -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

main {
    min-height: calc(100vh - 200px);
    padding-top: 120px;
}

/* --------------------------------------------------------------------------
   4. HEADER / NAVIGATION
   -------------------------------------------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    padding: 40px 24px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 110px;
}

.logo {
    text-decoration: none;
}

.logo img {
    height: auto;
    width: 180px;
    display: block;
}

.nav-toggle {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Main Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.main-nav.active {
    opacity: 1;
    visibility: visible;
}

.main-nav a {
    font-size: 1.125rem;
    font-weight: 400;
    color: #000;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #666;
}

/* Desktop Navigation */
@media (min-width: 768px) {
    .site-header {
        justify-content: space-between;
        padding: 20px 40px;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-toggle {
        display: none;
    }

    .main-nav {
        position: static;
        flex-direction: row;
        opacity: 1;
        visibility: visible;
        background: none;
        gap: 0;
        justify-content: space-between;
        width: 100%;
    }

    .nav-left,
    .nav-right {
        display: flex;
        gap: 24px;
    }

    .main-nav a {
        font-size: 0.875rem;
    }
}

/* --------------------------------------------------------------------------
   5. PAGE HEADER
   -------------------------------------------------------------------------- */

.page-header {
    text-align: center;
    padding: 40px 24px 40px;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   6. IMAGE GRID (Homepage)
   -------------------------------------------------------------------------- */

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.image-grid a,
.image-grid .grid-item {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
}

.image-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.image-grid a:hover img {
    opacity: 0.9;
}

@media (min-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --------------------------------------------------------------------------
   7. PROJECT GRID (Listings)
   -------------------------------------------------------------------------- */

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 24px 60px;
}

.project-card {
    display: block;
}

.project-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.project-card:hover img {
    opacity: 0.9;
}

.project-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 12px;
    text-align: center;
}

@media (min-width: 768px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        padding: 0 40px 80px;
    }
}

@media (min-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* --------------------------------------------------------------------------
   8. PROJECT DETAIL
   -------------------------------------------------------------------------- */

.project-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.project-detail h1 {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: #000;
}

.project-detail .description {
    text-align: center;
    color: #333;
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.project-gallery figure {
    margin: 0;
}

.project-gallery img {
    width: 100%;
    height: auto;
}

/* Project Navigation */
.project-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 60px 24px;
    border-top: 1px solid #eee;
    margin-top: 60px;
}

.project-nav a {
    font-size: 0.875rem;
    color: #666;
    transition: color 0.2s ease;
}

.project-nav a:hover {
    color: #000;
}

/* --------------------------------------------------------------------------
   9. ABOUT PAGE
   -------------------------------------------------------------------------- */

.about-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.about-content p {
    font-size: 0.9375rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-content blockquote {
    font-style: italic;
    margin: 2rem 0;
}

/* Contact Form */
.contact-form {
    max-width: 500px;
    margin: 60px auto 0;
}

.contact-form h2 {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ddd;
    background: #fff;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #000;
    background: #fff;
    border: 2px solid #000;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-submit:hover {
    background: #000;
    color: #fff;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 40px 0;
}

.social-links a {
    font-size: 0.875rem;
    color: #666;
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: #000;
}

/* --------------------------------------------------------------------------
   10. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
    background: #fff;
    padding: 60px 24px 40px;
    text-align: center;
    border-top: 1px solid #eee;
}

/* Newsletter */
.newsletter {
    max-width: 400px;
    margin: 0 auto 40px;
}

.newsletter h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.newsletter p {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 24px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.newsletter-form input {
    padding: 12px;
    font-size: 0.875rem;
    border: 1px solid #ddd;
    background: #fff;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #000;
}

.newsletter-form button {
    padding: 12px 24px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #000;
    background: #fff;
    border: 2px solid #000;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.newsletter-form button:hover {
    background: #000;
    color: #fff;
}

.newsletter .privacy {
    font-size: 0.75rem;
    color: #999;
    margin-top: 16px;
}

/* Copyright */
.copyright {
    font-size: 0.75rem;
    color: #999;
}

/* --------------------------------------------------------------------------
   11. UTILITIES
   -------------------------------------------------------------------------- */

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

.section-label {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-top: 80px;
    margin-bottom: 50px;
    color: #000;
}

/* Hero Banner (optional) */
.hero-banner {
    display: block;
    margin: 0 24px 40px;
    background: #f5f5f5;
    padding: 40px;
    text-align: center;
}

.hero-banner img {
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   12. RESPONSIVE ADJUSTMENTS
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {
    main {
        padding-top: 100px;
    }

    .page-header {
        padding: 80px 40px 60px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .project-detail {
        padding: 0 40px 100px;
    }

    .project-detail h1 {
        font-size: 2rem;
    }

    .about-content {
        padding: 0 40px 100px;
    }

    .site-footer {
        padding: 80px 40px 60px;
    }
}

@media (min-width: 1024px) {
    .page-header {
        padding: 100px 60px 80px;
    }
}
