@font-face {
    font-family: 'Archivo';
    src: url('/fonts/archivo.woff2') format('woff2');
    font-weight: 400 900;
    font-stretch: 100% 125%;
    font-display: swap;
}

@font-face {
    font-family: 'AK Mono';
    src: url('/fonts/akmono.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

:root {
    --bg: #0b0b0b;
    --bg-2: #131313;
    --line: #262626;
    --line-2: #3a3a3a;
    --fg: #edede6;
    --muted: #8c8c86;
    --accent: #ff4f00;
    --ink: #0b0b0b;

    --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'AK Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

    --pad: clamp(16px, 3vw, 40px);
    --bar-h: 56px;
}

/* Konami kodu */
:root.alt {
    --accent: #b8ff1a;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 400 17px/1.55 var(--sans);
    font-stretch: 100%;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul {
    margin: 0;
}

a {
    color: inherit;
}

.mono {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.skip {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 14px;
    background: var(--accent);
    color: var(--ink);
    font-weight: 700;
    transform: translateY(-200%);
}

.skip:focus {
    transform: none;
}

section[id] {
    scroll-margin-top: var(--bar-h);
}

/* ---------- Üst bar ---------- */
.bar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: var(--bar-h);
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0 var(--pad);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.bar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 800;
    font-stretch: 125%;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: -.01em;
}

.bar-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    background: var(--accent);
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
}

.bar-nav {
    display: flex;
    gap: 28px;
    margin-left: auto;
}

.bar-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted);
}

.bar-nav a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    transform: scale(0);
}

.bar-nav a:hover,
.bar-nav a.is-active {
    color: var(--fg);
}

.bar-nav a.is-active::before {
    transform: none;
}

.bar-clock {
    color: var(--muted);
    min-width: 12ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.bar-toggle {
    display: none;
    margin-left: auto;
    height: 36px;
    padding: 0 14px;
    background: none;
    border: 1px solid var(--line-2);
    color: var(--fg);
    cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    isolation: isolate;
    min-height: calc(100svh - var(--bar-h));
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    gap: clamp(20px, 3vw, 36px);
    padding: var(--pad);
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-scene {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    touch-action: pan-y;
    cursor: grab;
}

.hero-scene.is-grabbing {
    cursor: grabbing;
}

.hero-top,
.hero-hud,
.hero-title {
    pointer-events: none;
}

.hero-top {
    display: grid;
    gap: 4px;
    color: var(--muted);
}

.hero-top p:first-child {
    color: var(--fg);
}

.hero-hud {
    position: absolute;
    top: var(--pad);
    right: var(--pad);
    display: grid;
    justify-items: end;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
}

.hero-hud b {
    display: inline-block;
    min-width: 3ch;
    color: var(--fg);
    font-weight: 400;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hud-hint {
    margin-top: 8px;
    padding: 4px 6px;
    background: var(--accent);
    color: var(--ink);
}

.hero-title {
    grid-row: 3;
    font-size: clamp(60px, 17.5vw, 340px);
    font-weight: 900;
    font-stretch: 125%;
    line-height: .8;
    letter-spacing: -.035em;
    text-transform: uppercase;
    margin-left: -.04em;
}

.hero-title .line {
    display: block;
    overflow: hidden;
    padding-top: .06em;
}

.hero-title .line > span {
    display: block;
    animation: rise .9s cubic-bezier(.2, .8, 0, 1) both;
}

.hero-title .line:nth-child(2) > span {
    animation-delay: .07s;
}

.hero-foot {
    grid-row: 4;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line-2);
    animation: fade .8s .35s both;
}

.hero-lede {
    max-width: 34ch;
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.4;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@keyframes rise {
    from {
        transform: translateY(105%);
    }
}

@keyframes fade {
    from {
        opacity: 0;
    }
}

/* ---------- Buton ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 20px;
    border: 1px solid var(--fg);
    background: transparent;
    color: var(--fg);
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--fg);
    color: var(--ink);
}

.btn:active {
    transform: translateY(1px);
}

.btn-solid {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--ink);
}

.btn-solid:hover {
    background: var(--fg);
    border-color: var(--fg);
}

/* ---------- Durum şeridi ---------- */
.strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
}

.strip > div {
    display: grid;
    gap: 6px;
    padding: 18px var(--pad);
    border-right: 1px solid var(--line);
}

.strip > div:last-child {
    border-right: 0;
}

.strip dt {
    color: var(--muted);
    font-size: 11px;
}

.strip dd {
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
}

.live::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 10px;
    background: var(--accent);
    animation: blink 1.2s steps(1) infinite;
}

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

/* ---------- Bölümler ---------- */
.section {
    padding: clamp(72px, 11vw, 160px) var(--pad);
    border-bottom: 1px solid var(--line);
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: clamp(36px, 6vw, 80px);
    border-bottom: 2px solid var(--fg);
}

/* En uzun başlık ("Yetenekler") her ekran genişliğine sığacak şekilde */
.section-head h2 {
    font-size: clamp(30px, min(9vw, calc((100vw - 2 * var(--pad)) / 9.2)), 150px);
    font-weight: 900;
    font-stretch: 125%;
    line-height: .82;
    letter-spacing: -.035em;
    text-transform: uppercase;
}

.section-head .mono {
    color: var(--muted);
    white-space: nowrap;
}

/* Hakkımda */
.about {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(32px, 4vw, 56px) 24px;
}

.about-big {
    grid-column: 1 / -1;
    max-width: 24ch;
    font-size: clamp(28px, 4.4vw, 68px);
    font-weight: 700;
    font-stretch: 112%;
    line-height: 1.04;
    letter-spacing: -.02em;
}

.about-big em {
    font-style: normal;
    color: var(--accent);
}

.about-text {
    grid-column: 1 / 7;
    display: grid;
    gap: 1em;
    max-width: 60ch;
    color: #c4c4be;
}

.facts {
    grid-column: 8 / -1;
    align-self: start;
    border-bottom: 1px solid var(--line);
}

.facts > div {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.facts dt {
    color: var(--muted);
    font-size: 12px;
    padding-top: .25em;
}

/* Projeler */
.projects {
    list-style: none;
    padding: 0;
    border-top: 1px solid var(--line);
}

.project {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr) 12rem 11rem;
    gap: 24px;
    align-items: start;
    margin: 0 calc(var(--pad) * -1);
    padding: 32px var(--pad);
    border-bottom: 1px solid var(--line);
}

.p-num {
    color: var(--muted);
    padding-top: .5em;
}

.project h3 {
    margin-bottom: 12px;
    font-size: clamp(26px, 3vw, 44px);
    font-weight: 900;
    font-stretch: 125%;
    line-height: .95;
    letter-spacing: -.025em;
    text-transform: uppercase;
}

.project p {
    max-width: 58ch;
    color: var(--muted);
}

.p-tags {
    list-style: none;
    padding: .35em 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.p-tags li {
    padding: 5px 8px;
    border: 1px solid var(--line-2);
    font-size: 12px;
}

.p-state {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-top: .5em;
    font-size: 12px;
    color: var(--muted);
}

.p-state::before {
    content: '';
    width: 8px;
    height: 8px;
    border: 1px solid currentColor;
}

.p-state[data-state='wip'],
.p-state[data-state='live'] {
    color: var(--fg);
}

.p-state[data-state='wip']::before {
    background: var(--accent);
    border-color: var(--accent);
    animation: blink 1.2s steps(1) infinite;
}

.p-state[data-state='live']::before {
    background: var(--accent);
    border-color: var(--accent);
}

@media (hover: hover) {
    .project:hover {
        background: var(--accent);
        color: var(--ink);
    }

    .project:hover p,
    .project:hover .p-num,
    .project:hover .p-state {
        color: var(--ink);
    }

    .project:hover .p-tags li {
        border-color: var(--ink);
    }

    .project:hover .p-state::before {
        background: var(--ink);
        border-color: var(--ink);
    }
}

/* Yetenekler: envanter */
.inv {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.inv-group {
    padding: 20px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.inv-group h3 {
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 400;
}

.slots {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    counter-reset: slot;
}

.slots li {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 84px;
    padding: 12px;
    border: 1px solid var(--line-2);
    background: var(--bg-2);
    font-size: 17px;
    font-weight: 800;
    font-stretch: 112%;
    line-height: 1.1;
    counter-increment: slot;
}

.slots li::before {
    content: '0' counter(slot);
    position: absolute;
    top: 10px;
    left: 12px;
    font: 400 11px var(--mono);
    color: var(--muted);
}

.slots li.empty {
    background: none;
    border-style: dashed;
    border-color: var(--line);
}

.slots li.empty::before {
    content: 'boş';
    text-transform: uppercase;
    color: var(--line-2);
}

@media (hover: hover) {
    .slots li:not(.empty):hover {
        border-color: var(--accent);
        color: var(--accent);
    }
}

/* İletişim */
.contact-lede {
    max-width: 26ch;
    font-size: clamp(24px, 3.2vw, 44px);
    font-weight: 700;
    font-stretch: 112%;
    line-height: 1.08;
    letter-spacing: -.015em;
}

.contact-mail {
    display: block;
    width: fit-content;
    margin: clamp(40px, 6vw, 80px) 0;
    font-size: clamp(30px, min(12.4vw, calc((100vw - 2 * var(--pad)) / 7.6)), 230px);
    font-weight: 900;
    font-stretch: 125%;
    line-height: .86;
    letter-spacing: -.045em;
    text-decoration: none;
}

.contact-mail span {
    display: block;
}

.contact-mail span:last-child {
    color: var(--accent);
}

.contact-mail:hover span:first-child {
    color: var(--accent);
}

.contact-mail:hover span:last-child {
    color: var(--fg);
}

.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Alt bilgi */
.foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 24px var(--pad);
    color: var(--muted);
    font-size: 12px;
}

.foot a {
    text-decoration: none;
    color: var(--fg);
}

.foot a:hover {
    color: var(--accent);
}

/* Bildirim */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 50;
    padding: 12px 16px;
    background: var(--accent);
    color: var(--ink);
    transform: translate(-50%, calc(100% + 32px));
    visibility: hidden;
    transition: transform .25s steps(4), visibility 0s .25s;
    pointer-events: none;
}

.toast.show {
    transform: translate(-50%, 0);
    visibility: visible;
    transition: transform .25s steps(4);
}

/* Kaydırınca beliren öğeler (ilk ekranın dışında kalanlara JS ekler) */
.reveal {
    transition: opacity .7s cubic-bezier(.2, .7, 0, 1), transform .7s cubic-bezier(.2, .7, 0, 1);
}

.reveal.pending {
    opacity: 0;
    transform: translateY(32px);
}

/* 404 */
.nf {
    min-height: 100svh;
    display: grid;
    align-content: center;
    gap: 28px;
    padding: var(--pad);
}

.nf h1 {
    font-size: clamp(36px, 8.6vw, 170px);
    font-weight: 900;
    font-stretch: 125%;
    line-height: .82;
    letter-spacing: -.035em;
    text-transform: uppercase;
}

.nf .mono {
    color: var(--accent);
}

.nf p:not(.mono) {
    color: var(--muted);
}

.nf .btn {
    justify-self: start;
}

/* ---------- Duyarlı ---------- */
@media (max-width: 1100px) {
    .project {
        grid-template-columns: 3rem minmax(0, 1fr) auto;
    }

    .p-tags {
        grid-column: 2;
        padding-top: 0;
    }

    .p-state {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (max-width: 860px) {
    .bar-nav {
        position: fixed;
        top: var(--bar-h);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        visibility: hidden;
        transform: translateY(-8px);
        opacity: 0;
        transition: opacity .15s, transform .15s, visibility 0s .15s;
    }

    .menu-open .bar-nav {
        visibility: visible;
        transform: none;
        opacity: 1;
        transition: opacity .15s, transform .15s;
    }

    .bar-nav a {
        padding: 18px var(--pad);
        border-top: 1px solid var(--line);
        font-size: 15px;
        color: var(--fg);
    }

    .bar-clock {
        display: none;
    }

    .bar-toggle {
        display: block;
    }

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

    .strip > div:nth-child(2) {
        border-right: 0;
    }

    .strip > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .about-text,
    .facts {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    /* "Kıraç" tam ekran genişliğini doldurur */
    .hero-title {
        font-size: calc((100vw - 2 * var(--pad)) / 4.05);
    }

    .hero-hud {
        font-size: 11px;
    }

    .hud-hint {
        display: none;
    }

    .hero-cta {
        width: 100%;
    }

    .hero-cta .btn {
        flex: 1;
        justify-content: center;
    }

    .project {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 16px;
    }

    .p-num {
        grid-column: 1;
        grid-row: 1;
        padding-top: 0;
    }

    .p-state {
        grid-column: 2;
        grid-row: 1;
        padding-top: 0;
    }

    .p-main,
    .p-tags {
        grid-column: 1 / -1;
    }

    .facts > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .slots li {
        min-height: 72px;
        font-size: 15px;
    }

    .contact-row .btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
