/* ========================================
   DOGANAZ DEMIR SAHIN - Portfolio Website
   Warm Tones Theme
   ======================================== */

/* --- CSS Variables --- */
:root {
    --color-bg: #FAF6F1;
    --color-bg-alt: #F2EBE1;
    --color-bg-dark: #3D3229;
    --color-text: #3D3229;
    --color-text-light: #7A6E63;
    --color-text-muted: #A69A8E;
    --color-accent: #C4956A;
    --color-accent-dark: #A67B52;
    --color-border: #E5DDD3;
    --color-white: #FFFFFF;

    --font-heading: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

    --container-max: 1200px;
    --section-padding: 100px;
    --transition: 0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

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

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

/* --- Container --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 40px;
}

/* --- Section --- */
.section {
    padding: var(--section-padding) 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 60px;
    text-align: center;
    letter-spacing: 0.02em;
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background-color: rgba(250, 246, 241, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition);
}

.navbar.scrolled {
    padding: 14px 40px;
    box-shadow: 0 1px 0 var(--color-border);
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: 0.02em;
}

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

.nav-links a {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-light);
    position: relative;
    padding-bottom: 4px;
}

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

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

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

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background-color: var(--color-text);
    transition: all var(--transition);
}

/* ========================================
   HERO
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 40px 80px;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    opacity: 0.5;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: 0.02em;
    color: var(--color-text);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 300;
    font-style: italic;
    color: var(--color-text-light);
    max-width: 500px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: inline-block;
    padding: 14px 40px;
    border: 1px solid var(--color-accent);
    color: var(--color-accent-dark);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: all var(--transition);
}

.hero-cta:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* ========================================
   ABOUT
   ======================================== */
.about-section {
    background-color: var(--color-bg);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--color-text-light);
}

/* ========================================
   SERVICES
   ======================================== */
.services-section {
    background-color: var(--color-bg-alt);
}

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

.service-card {
    text-align: center;
    padding: 50px 30px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(61, 50, 41, 0.06);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    color: var(--color-accent);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 12px;
    color: var(--color-text);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

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

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

.contact-card {
    text-align: center;
    padding: 40px 20px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.contact-card:hover {
    border-color: var(--color-accent);
}

.contact-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 20px;
    color: var(--color-accent);
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--color-text);
}

.contact-card p {
    font-size: 0.88rem;
    color: var(--color-text-light);
    line-height: 1.7;
    word-break: break-word;
}

/* ========================================
   PAGE HEADER (Portfolio)
   ======================================== */
.page-header {
    padding: 160px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--color-text);
    margin-bottom: 16px;
}

.page-header p {
    font-size: 1rem;
    color: var(--color-text-light);
    font-weight: 300;
}

/* ========================================
   PORTFOLIO GRID
   ======================================== */
.portfolio-section {
    padding-top: 60px;
}

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

.portfolio-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
    background-color: var(--color-white);
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(61, 50, 41, 0.08);
}

.portfolio-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

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

.portfolio-card:hover .portfolio-card-image img {
    transform: scale(1.05);
}

.portfolio-card-info {
    padding: 24px;
}

.portfolio-card-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 6px;
}

.portfolio-card-info p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

/* ========================================
   PROJECT PAGE
   ======================================== */
.project-header {
    padding: 140px 0 50px;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 30px;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--color-accent);
}

.project-header h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 300;
    color: var(--color-text);
    margin-bottom: 20px;
}

.project-description {
    font-size: 1.05rem;
    color: var(--color-text-light);
    max-width: 650px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.project-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
}

/* ========================================
   GALLERY
   ======================================== */
.gallery-section {
    padding-top: 40px;
}

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

.gallery-item {
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(61, 50, 41, 0);
    transition: background var(--transition);
    pointer-events: none;
}

.gallery-item:hover::after {
    background: rgba(61, 50, 41, 0.08);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item--wide {
    grid-column: span 2;
}

.gallery-item--wide img {
    aspect-ratio: 2 / 1;
}

.gallery-item--tall {
    grid-row: span 2;
}

.gallery-item--tall img {
    aspect-ratio: auto;
    height: 100%;
}

/* ========================================
   LIGHTBOX
   ======================================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(20, 16, 12, 0.95);
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2.5rem;
    cursor: pointer;
    transition: color var(--transition);
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--color-white);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
    cursor: pointer;
    padding: 20px;
    transition: color var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--color-white);
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item--wide {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 70px;
    }

    .container {
        padding: 0 24px;
    }

    /* Navbar Mobile */
    .navbar {
        padding: 16px 24px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background-color: var(--color-bg);
        padding: 100px 40px;
        gap: 30px;
        transition: right 0.4s ease;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    }

    .nav-links.open {
        right: 0;
    }

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

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

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

    /* Hero Mobile */
    .hero {
        padding: 120px 24px 60px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero::before {
        width: 260px;
        height: 260px;
    }

    /* Sections */
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .service-card {
        padding: 36px 24px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact-card {
        padding: 30px 20px;
    }

    /* Page Header */
    .page-header {
        padding: 130px 0 40px;
    }

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

    /* Project Header */
    .project-header {
        padding: 120px 0 40px;
    }

    .project-header h1 {
        font-size: 2.5rem;
    }

    /* Gallery Mobile */
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .gallery-item--wide {
        grid-column: span 2;
    }

    .gallery-item--tall {
        grid-row: span 1;
    }

    .gallery-item--tall img {
        aspect-ratio: 1;
    }

    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    /* Lightbox */
    .lightbox {
        padding: 20px;
    }

    .lightbox-prev {
        left: 0;
        padding: 10px;
    }

    .lightbox-next {
        right: 0;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.4rem;
    }

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

    .gallery-item--wide {
        grid-column: span 1;
    }

    .gallery-item--wide img {
        aspect-ratio: 4 / 3;
    }
}
