/* ==========================================================================
   E. Serkan Gençtürk — Portfolyo Sitesi
   ========================================================================== */

:root {
    --accent: #C3E41D;
    --bg: #0a0a0a;
    --bg-elevated: #131313;
    --text: #ffffff;
    --text-dim: #8a8a8a;
    --border: rgba(255, 255, 255, 0.1);
    --font-display: 'Fira Code', ui-monospace, monospace;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-tagline: 'Antic', var(--font-body);
    --container-w: 1200px;
}

html[data-theme="light"] {
    --bg: #fafafa;
    --bg-elevated: #ffffff;
    --text: #171717;
    --text-dim: #6b6b6b;
    --border: rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    transition: background-color .3s ease, color .3s ease;
    -webkit-font-smoothing: antialiased;
}

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

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

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 24px;
}

.eyebrow {
    display: block;
    font-family: var(--font-tagline);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: 13px;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 4vw, 44px);
    margin: 0 0 32px;
    letter-spacing: -0.02em;
}

/* ---------------- Header / Nav ---------------- */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    padding: 24px;
    background: var(--bg);
}

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

.nav-menu-wrap { position: relative; }

.menu-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    padding: 8px;
    cursor: pointer;
    transition: color .3s ease;
}
.menu-btn:hover { color: var(--text); }
.menu-btn svg { width: 28px; height: 28px; }
.menu-btn .icon-close { display: none; }
.menu-btn.is-open .icon-menu { display: none; }
.menu-btn.is-open .icon-close { display: block; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    min-width: 220px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    padding: 12px;
    display: none;
    flex-direction: column;
    z-index: 100;
}
.dropdown-menu.is-open { display: flex; }

.menu-item {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    padding: 8px 10px;
    border-radius: 8px;
    transition: color .2s ease;
}
.menu-item:hover, .menu-item.is-active { color: var(--accent); }

.signature {
    font-family: 'Brush Script MT', 'Lucida Handwriting', cursive;
    font-size: 34px;
}

.theme-toggle {
    width: 56px;
    height: 28px;
    border-radius: 999px;
    background: var(--border);
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0;
}
.theme-toggle-dot {
    position: absolute;
    top: 3px; left: 3px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--text);
    transition: transform .3s ease;
}
html[data-theme="light"] .theme-toggle-dot { transform: translateX(28px); }

/* ---------------- Hero ---------------- */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 16px 100px;
    text-align: center;
}

.hero-center { position: relative; }

.hero-name {
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: -0.04em;
    line-height: 0.85;
    font-size: clamp(56px, 15vw, 180px);
}

.hero-portrait {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(65px, 12vw, 129px);
    height: clamp(110px, 20vw, 218px);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    transition: transform .3s ease;
    z-index: 2;
}
.hero-portrait:hover { transform: translate(-50%, -50%) scale(1.08); }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }

.hero-tagline {
    margin-top: 48px;
    max-width: 520px;
    color: var(--text-dim);
    font-family: var(--font-tagline);
    font-size: clamp(15px, 2vw, 22px);
    justify-content: center;
}

.scroll-cue {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-dim);
    animation: bob 2.2s ease-in-out infinite;
}
.scroll-cue:hover { color: var(--text); }
.scroll-cue svg { width: 26px; height: 26px; }

@keyframes bob {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

/* ---------------- Blur text reveal ---------------- */

.blur-text {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: inherit;
}
.blur-text .segment {
    display: inline-block;
    filter: blur(10px);
    opacity: 0;
    transform: translateY(-20px);
    transition: all .5s ease-out;
}
.blur-text.is-visible .segment {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
}

/* ---------------- Sections (shared) ---------------- */

.section { padding: 120px 0; }
.section:nth-of-type(even) { background: var(--bg-elevated); }

/* ---------------- About ---------------- */

.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 80px;
}

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

.about-role {
    color: var(--accent) !important;
    font-family: var(--font-tagline);
    font-size: 18px !important;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--border);
}
.timeline li {
    position: relative;
    padding: 0 0 32px 28px;
}
.timeline li::before {
    content: '';
    position: absolute;
    left: -5px; top: 4px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--accent);
}
.timeline-year {
    display: block;
    font-family: var(--font-display);
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}
.timeline-text { color: var(--text-dim); font-size: 15px; line-height: 1.5; }

/* ---------------- Portfolio ---------------- */

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

.gallery-item {
    position: relative;
    border: none;
    padding: 0;
    background: var(--bg-elevated);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 5;
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 20px 16px;
    background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    opacity: 0;
    transform: translateY(8px);
    transition: all .3s ease;
}
.gallery-item:hover .gallery-caption { opacity: 1; transform: translateY(0); }
.gallery-category {
    color: var(--accent);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-family: var(--font-tagline);
}
.gallery-title { color: #fff; font-weight: 600; font-size: 15px; }

/* ---------------- Services ---------------- */

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.service-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: border-color .3s ease;
}
.service-card:hover { border-color: var(--accent); }
.service-index {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}
.service-card h3 { margin: 12px 0 8px; font-size: 19px; }
.service-card p { color: var(--text-dim); margin: 0; line-height: 1.6; font-size: 14.5px; }

/* ---------------- Contact ---------------- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
}
.contact-info p { color: var(--text-dim); line-height: 1.7; }
.contact-list { list-style: none; margin: 32px 0 0; padding: 0; }
.contact-list li {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}
.contact-list li span:first-child { color: var(--text-dim); }
.contact-list li a:hover { color: var(--accent); }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.contact-form input,
.contact-form textarea {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    margin-top: 8px;
    align-self: flex-start;
    background: var(--accent);
    color: #0a0a0a;
    border: none;
    border-radius: 999px;
    padding: 13px 32px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: opacity .2s ease;
}
.btn-primary:hover { opacity: .85; }

.form-alert {
    margin: 0 0 8px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
}
.form-alert-success { background: rgba(195,228,29,.12); color: var(--accent); }
.form-alert-error { background: rgba(255,90,90,.12); color: #ff5a5a; }

/* ---------------- Footer ---------------- */

.site-footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.footer-signature { font-family: var(--font-display); font-weight: 700; }
.footer-copy { color: var(--text-dim); font-size: 13px; margin: 0; }
.footer-social { display: flex; gap: 20px; }
.footer-social a { color: var(--text-dim); font-size: 13px; }
.footer-social a:hover { color: var(--accent); }

/* ---------------- Lightbox ---------------- */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 200;
    padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(90vw, 900px); max-height: 75vh; border-radius: 8px; object-fit: contain; }
.lightbox-caption { color: #fff; margin-top: 16px; text-align: center; }
.lightbox-close {
    position: absolute;
    top: 24px; right: 32px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .services-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .section { padding: 80px 0; }
}
