:root,
[data-theme="light"] {
    --bg: #f1ece2;
    --bg-tint: #e9e3d6;
    --surface: #f7f3eb;
    --text: #1d211e;
    --muted: #625f57;
    --faint: #8e897d;
    --line: #d9d1c1;
    --accent: #c4471b;
    --accent-soft: rgba(196, 71, 27, 0.1);
    --on-accent: #fff8f0;
    --logo-filter: none;
    --danger: #b8382a;
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #131915;
    --bg-tint: #18201b;
    --surface: #1b231e;
    --text: #e4e0d4;
    --muted: #a19d90;
    --faint: #6f7369;
    --line: #2a332d;
    --accent: #ec7a4b;
    --accent-soft: rgba(236, 122, 75, 0.12);
    --on-accent: #1a120d;
    --logo-filter: invert(0.88) sepia(0.12);
    --danger: #f08a7a;
    color-scheme: dark;
}

:root {
    --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

    --container: 1120px;
    --gutter: 28px;
    --radius: 10px;
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

body.menu-open {
    overflow: hidden;
}

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

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

ul,
ol {
    list-style: none;
}

button,
input,
textarea {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
}

button {
    cursor: pointer;
}

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

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.main {
    flex: 1;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

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

.kicker {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--accent);
}

.kicker::before {
    content: "— ";
}

.section-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-text {
    margin-top: 8px;
    color: var(--muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-solid {
    background: var(--text);
    color: var(--bg);
}

.btn-solid:hover {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-line {
    border: 1px solid var(--line);
}

.btn-line:hover {
    border-color: var(--text);
}

.more-link {
    display: inline-flex;
    gap: 6px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
    transition: color 0.2s;
}

.more-link::after {
    content: "→";
    transition: transform 0.2s;
}

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

.more-link:hover::after {
    transform: translateX(3px);
}

/* ---------- Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transition: background-color 0.3s;
}

/* Logo solda, menü ortada, tema seçici sağda */
.header-inner {
    height: 68px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.logo img {
    height: 22px;
    width: auto;
    filter: var(--logo-filter);
}

.nav-list {
    display: flex;
    gap: 4px;
}

.nav-link {
    position: relative;
    display: block;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.is-active {
    color: var(--text);
}

/* Aktif sayfanın altında küçük turuncu çizgi */
.nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Tema seçici */
.theme-switch {
    display: flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.theme-option {
    display: grid;
    place-items: center;
    width: 34px;
    height: 30px;
    border-radius: 999px;
    color: var(--faint);
    transition: background-color 0.2s, color 0.2s;
}

.theme-option:hover {
    color: var(--text);
}

.theme-option[aria-pressed="true"] {
    background: var(--text);
    color: var(--bg);
}

.nav-toggle {
    display: none;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Anasayfa giriş ---------- */
.intro {
    padding: 88px 0 96px;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 64px;
    align-items: end;
}

.intro-title {
    margin-top: 20px;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.intro-text {
    margin-top: 24px;
    max-width: 46ch;
    font-size: 18px;
    color: var(--muted);
}

.intro-actions {
    margin-top: 36px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Kısaca kartı */
.id-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.id-card-title {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--faint);
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--line);
}

.id-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 14px;
}

.id-list dt {
    color: var(--faint);
}

.id-list dd {
    text-align: right;
    font-weight: 500;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--accent);
    vertical-align: 1px;
}

.id-card-mail {
    display: block;
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--accent);
}

.id-card-mail:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Bölümler ---------- */
.section {
    padding: 88px 0;
}

.section-tight {
    padding-top: 8px;
}

.section-tint {
    background: var(--bg-tint);
    border-block: 1px solid var(--line);
    transition: background-color 0.3s;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
}

.prose {
    margin-top: 20px;
    max-width: 54ch;
}

.prose p {
    color: var(--muted);
}

.prose p + p {
    margin-top: 14px;
}

/* Teknolojiler */
.tech-label {
    margin: 24px 0 10px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--faint);
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-list li {
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    font-size: 15px;
    font-weight: 500;
}

.tech-list-next li {
    border-style: dashed;
    background: transparent;
    color: var(--muted);
}

.split .more-link {
    margin-top: 32px;
}

/* ---------- Proje ızgarası ---------- */
/* Kartlar arasında boşluk yok; ortak 1px çizgilerle bölünür */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.project {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px;
    background: var(--bg);
    transition: background-color 0.2s;
}

.project:hover {
    background: var(--surface);
}

.project-top {
    display: flex;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--faint);
}

.project-title {
    margin-top: 40px;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.4vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

.project:hover .project-title {
    color: var(--accent);
}

.project-desc {
    margin-top: 10px;
    max-width: 44ch;
    color: var(--muted);
    font-size: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
}

.project-tags li {
    padding: 3px 9px;
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 12px;
}

.project-links {
    display: flex;
    gap: 20px;
    margin-top: auto;
    padding-top: 28px;
}

.project-link {
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid var(--line);
    transition: border-color 0.2s, color 0.2s;
}

.project-link::after {
    content: " ↗";
    color: var(--faint);
}

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

.project-empty {
    grid-column: 1 / -1;
    padding: 48px 28px;
    background: var(--bg);
    color: var(--faint);
    text-align: center;
}

/* Filtre */
.filter {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 28px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.filter-item {
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    transition: background-color 0.2s, color 0.2s;
}

.filter-item:hover {
    color: var(--text);
}

.filter-item.is-active {
    background: var(--text);
    color: var(--bg);
}

.filter-count {
    margin-left: 6px;
    font-family: var(--mono);
    font-size: 11px;
    opacity: 0.6;
}

/* ---------- Kapanış bandı ---------- */
.band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding: 40px;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--on-accent);
}

.band-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.band-mail {
    font-family: var(--mono);
    font-size: 15px;
    padding: 12px 18px;
    border: 1px solid currentColor;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.band-mail:hover {
    background: var(--on-accent);
    color: var(--accent);
}

/* ---------- Alt sayfa başlığı ---------- */
.page-head {
    padding: 80px 0 56px;
}

.page-title {
    margin-top: 16px;
    max-width: 18ch;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.3rem, 5.4vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
}

.page-text {
    margin-top: 20px;
    max-width: 52ch;
    font-size: 17px;
    color: var(--muted);
}

/* ---------- Kariyer ---------- */
.skill-list {
    margin-top: 20px;
    border-top: 1px solid var(--line);
}

.skill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.skill-name {
    font-family: var(--display);
    font-weight: 500;
    font-size: 20px;
}

.skill-level {
    padding: 3px 10px;
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 12px;
}

.skill-level-next {
    background: transparent;
    border: 1px dashed var(--line);
    color: var(--faint);
}

.timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.timeline-item {
    position: relative;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
}

.timeline-item-next {
    border-style: dashed;
    background: transparent;
}

.timeline-date {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--accent);
}

.timeline-title {
    margin-top: 28px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.timeline-text {
    margin-top: 8px;
    color: var(--muted);
    font-size: 15px;
}

/* ---------- İletişim ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 64px;
    align-items: start;
}

.contact-info .tech-label:first-child {
    margin-top: 0;
}

.contact-mail {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    letter-spacing: -0.01em;
    border-bottom: 2px solid var(--accent);
    word-break: break-all;
    transition: color 0.2s;
}

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

.contact-info .tech-label + .contact-socials {
    margin-top: 0;
}

.contact-info .contact-mail + .tech-label {
    margin-top: 40px;
}

.contact-socials {
    border-top: 1px solid var(--line);
}

.contact-socials a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-weight: 500;
    transition: color 0.2s;
}

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

.contact-handle {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--faint);
}

.contact-form {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.form-title {
    margin-bottom: 24px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 22px;
}

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

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

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
    color: var(--faint);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-input.is-invalid {
    border-color: var(--danger);
}

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

.form-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--danger);
}

.form-status {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 14px;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--line);
    padding: 40px 0;
    font-size: 14px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.footer-brand img {
    height: 18px;
    width: auto;
    filter: var(--logo-filter);
}

.footer-brand p {
    margin-top: 8px;
    color: var(--faint);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--muted);
    transition: color 0.2s;
}

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

.footer-copy {
    justify-self: end;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .id-card {
        max-width: 420px;
    }

    .split,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .footer-copy {
        justify-self: start;
    }
}

@media (max-width: 760px) {
    :root {
        --gutter: 20px;
    }

    .header-inner {
        grid-template-columns: 1fr auto;
    }

    .nav-toggle {
        display: block;
    }

    /* Mobilde menü header'ın altında açılır */
    .nav {
        position: fixed;
        top: 69px;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 16px var(--gutter);
        background: var(--bg);
        display: none;
    }

    .nav.is-open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
    }

    .nav-link {
        padding: 16px 0;
        font-family: var(--display);
        font-size: 28px;
        font-weight: 700;
        border-bottom: 1px solid var(--line);
    }

    .nav-link.is-active::after {
        display: none;
    }

    .nav-link.is-active {
        color: var(--accent);
    }

    .intro {
        padding: 56px 0 72px;
    }

    .section {
        padding: 64px 0;
    }

    .section-tight {
        padding-top: 0;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .project-grid,
    .timeline {
        grid-template-columns: 1fr;
    }

    .project {
        padding: 24px;
    }

    .project-title {
        margin-top: 28px;
    }

    .band {
        padding: 28px;
    }

    .page-head {
        padding: 56px 0 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form {
        padding: 24px;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
