﻿/* ============================================================
   Zeyd Özer — 3D Interactive Portfolio
   ============================================================ */

:root {
    --bg: #04070d;
    --ink: #e8f1ff;
    --muted: #9db4d0;
    --primary: #7cc4ff;
    --cyan: #22d3ee;
    --blue: #60a5fa;
    --violet: #a78bfa;
    --glass: rgba(148, 197, 255, 0.05);
    --glass-strong: rgba(148, 197, 255, 0.09);
    --line: rgba(124, 196, 255, 0.15);
    --nav-h: 68px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
}

body {
    font-family: 'Ubuntu', system-ui, sans-serif;
    background:
        radial-gradient(1100px 600px at 85% -10%, rgba(34, 211, 238, 0.08), transparent 60%),
        radial-gradient(900px 700px at -10% 30%, rgba(124, 196, 255, 0.07), transparent 55%),
        radial-gradient(800px 600px at 60% 110%, rgba(167, 139, 250, 0.06), transparent 60%),
        var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    line-height: 1.6;
}

::selection { background: rgba(124, 196, 255, 0.35); }

/* ---------- 3D background canvas ---------- */
#bg3d {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

main, nav, footer { position: relative; z-index: 1; }

/* ---------- Scroll progress ---------- */
#progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--cyan), var(--violet));
    z-index: 60;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}

/* ---------- Navigation ---------- */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    background: rgba(5, 10, 20, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--line);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

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

.logo {
    display: inline-flex;
    padding: 3px;
    border: 1px solid rgba(124, 196, 255, 0.3);
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(124, 196, 255, 0.12), rgba(34, 211, 238, 0.12));
    transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
}

.logo img {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    object-fit: cover;
    display: block;
}

.logo:hover {
    border-color: rgba(124, 196, 255, 0.6);
    box-shadow: 0 0 24px rgba(124, 196, 255, 0.25);
    transform: translateY(-1px);
}

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

.nav-link {
    color: var(--ink);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    transition: color 0.25s, background 0.25s;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: rgba(124, 196, 255, 0.08);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--glass);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.25s;
}

.lang-btn:hover { color: var(--ink); }
.lang-btn.active { color: var(--primary); }
.lang-sep { color: rgba(157, 180, 208, 0.4); }

#menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

#menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

#menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menu-btn.open span:nth-child(2) { opacity: 0; }
#menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px 24px 20px;
    background: rgba(5, 10, 20, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

#mobile-menu.open { display: flex; }
#mobile-menu .lang-switch { margin: 8px 0 0; width: fit-content; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: 1200px; margin: 0 auto; }

.sec { padding: 110px 24px; }

.sec-head { text-align: center; margin-bottom: 64px; }

.sec-head h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 0 30px rgba(124, 196, 255, 0.25);
}

.sec-bar {
    width: 96px;
    height: 4px;
    margin: 16px auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.5);
}

/* ---------- Hero ---------- */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-h) + 48px) 24px 64px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    width: 100%;
}

.hero-hello {
    font-size: 1.15rem;
    color: var(--muted);
    letter-spacing: 1px;
}

.hero-name {
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 6px 0 14px;
    background: linear-gradient(100deg, var(--primary) 10%, var(--cyan) 50%, var(--violet) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 24px rgba(34, 211, 238, 0.25));
}

.hero-role {
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    font-weight: 500;
    color: var(--cyan);
    min-height: 1.8em;
    margin-bottom: 16px;
}

.caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--cyan);
    margin-left: 3px;
    vertical-align: text-bottom;
    animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 540px;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.25s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
    will-change: transform;
}

.btn-sm { padding: 9px 18px; font-size: 0.92rem; border-radius: 10px; }

.btn-primary {
    background: linear-gradient(120deg, var(--primary), var(--cyan));
    color: #04121f;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(34, 211, 238, 0.35);
}

.btn-ghost {
    border-color: rgba(124, 196, 255, 0.4);
    color: var(--primary);
    background: rgba(124, 196, 255, 0.05);
}

.btn-ghost:hover {
    transform: translateY(-3px);
    background: rgba(124, 196, 255, 0.12);
    box-shadow: 0 12px 28px rgba(124, 196, 255, 0.18);
}

.btn-cyan { background: var(--cyan); color: #04121f; }
.btn-cyan:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(34, 211, 238, 0.35); }

.btn-violet { background: var(--violet); color: #120a24; }
.btn-violet:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(167, 139, 250, 0.35); }

/* ---------- Socials ---------- */
.socials { display: flex; gap: 12px; }

.socials a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    border: 1px solid var(--line);
    background: var(--glass);
    transition: transform 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.socials a:hover {
    color: var(--primary);
    border-color: rgba(124, 196, 255, 0.5);
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 10px 24px rgba(124, 196, 255, 0.2);
}

/* ---------- 3D Coverflow carousel ---------- */
.cf {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.cf-stage {
    position: relative;
    height: clamp(240px, 30vw, 400px);
    perspective: 1400px;
    transform-style: preserve-3d;
    touch-action: pan-y;
    cursor: grab;
}

.cf-stage:active { cursor: grabbing; }

.cf-slide {
    position: absolute;
    inset: 0;
    transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.65s, filter 0.65s;
    will-change: transform;
}

.cf-slide a {
    display: block;
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    position: relative;
    background: #0a1322;
}

.cf-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.cf-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: linear-gradient(transparent, rgba(4, 7, 13, 0.92));
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s, transform 0.5s;
}

.cf-slide.is-center .cf-caption { opacity: 1; transform: none; }

.cf-caption small { color: var(--cyan); font-weight: 500; letter-spacing: 0.5px; }
.cf-caption strong { font-size: 1.25rem; }
.cf-caption span { color: var(--muted); font-size: 0.95rem; }

.cf-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(5, 10, 20, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, transform 0.25s;
}

.cf-btn:hover { color: var(--primary); background: rgba(5, 10, 20, 0.85); transform: translateY(-50%) scale(1.08); }
.cf-prev { left: -10px; }
.cf-next { right: -10px; }

.cf-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

.cf-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(157, 180, 208, 0.35);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s, width 0.3s, border-radius 0.3s;
}

.cf-dot:hover { background: rgba(157, 180, 208, 0.7); }
.cf-dot.active {
    background: var(--cyan);
    width: 24px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.7);
}

/* ---------- Scroll hint ---------- */
.scroll-hint {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
}

.mouse {
    display: block;
    width: 26px;
    height: 42px;
    border: 2px solid var(--muted);
    border-radius: 14px;
    position: relative;
}

.wheel {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--cyan);
    animation: wheel 1.8s ease-in-out infinite;
}

@keyframes wheel {
    0% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(14px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Cards (glass + 3D tilt) ---------- */
.card {
    --gx: 50%;
    --gy: 50%;
    --glow: 0;
    position: relative;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.2s ease-out, border-color 0.3s, box-shadow 0.3s;
    transform-style: preserve-3d;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(420px circle at var(--gx) var(--gy), rgba(124, 196, 255, 0.14), transparent 55%);
    opacity: var(--glow);
    transition: opacity 0.3s;
}

.card:hover {
    border-color: rgba(124, 196, 255, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(34, 211, 238, 0.07);
}

.card h4 { font-size: 1.35rem; margin-bottom: 4px; }
.card h5 { font-size: 1.15rem; margin-bottom: 10px; }
.card h6 { font-size: 1.05rem; margin-bottom: 6px; }
.card > p { color: var(--muted); font-size: 0.95rem; }

.card-icon { margin-bottom: 14px; }
.c-primary { color: var(--primary); }
.c-cyan { color: var(--cyan); }
.c-blue { color: var(--blue); }
.c-violet { color: var(--violet); }

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.about-text p { font-size: 1.12rem; margin-bottom: 20px; }
.about-text .dim { color: var(--muted); font-size: 1.02rem; }

.skill-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

/* ---------- Services ---------- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

/* ---------- Experience ---------- */
.exp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.exp-card h4 { margin: 14px 0 2px; }

.exp-company {
    color: var(--cyan);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.25s;
}

a.exp-company:hover { color: var(--primary); }

/* ---------- Check lists ---------- */
.checks {
    list-style: none;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checks li {
    position: relative;
    padding-left: 24px;
    color: var(--muted);
    font-size: 0.96rem;
}

.checks li::before {
    content: '▹';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--cyan);
    font-weight: 700;
}

/* ---------- Chips ---------- */
.chip {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.chip-primary { color: var(--primary); border-color: rgba(124, 196, 255, 0.3); background: rgba(124, 196, 255, 0.08); }
.chip-cyan { color: var(--cyan); border-color: rgba(34, 211, 238, 0.3); background: rgba(34, 211, 238, 0.08); }
.chip-blue { color: var(--blue); border-color: rgba(96, 165, 250, 0.3); background: rgba(96, 165, 250, 0.08); }
.chip-violet { color: var(--violet); border-color: rgba(167, 139, 250, 0.3); background: rgba(167, 139, 250, 0.08); }

/* ---------- Portfolio ---------- */
.pf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: start;
}

.pf-card { display: flex; flex-direction: column; }
.pf-sub { font-weight: 500; margin-bottom: 4px; }
.pf-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Footer ---------- */
footer {
    border-top: 1px solid var(--line);
    background: rgba(5, 10, 20, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px 24px;
}

.foot-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.foot-wrap p { color: var(--muted); }
footer .socials a { width: 40px; height: 40px; }

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .service-grid { grid-template-columns: 1fr 1fr; }
    .exp-grid { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; }
}

@media (max-width: 860px) {
    .nav-links { display: none; }
    #menu-btn { display: flex; }

    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .cf-stage { height: clamp(220px, 52vw, 360px); }
    .cf-prev { left: 4px; }
    .cf-next { right: 4px; }

    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .pf-grid { grid-template-columns: 1fr; }
    .sec { padding: 80px 20px; }

    .scroll-hint { display: none; }
}

@media (max-width: 520px) {
    .skill-grid { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: 1fr; }
    .hero-btns .btn { width: 100%; justify-content: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal { opacity: 1; transform: none; }
}

