/* ============================================================
   Serhat Sönmez — Personal Website (v2)
   Pure CSS · no framework · Dracula palette
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
    font-family: "Cascadia Code";
    src: url("../fonts/CascadiaCode.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
    --bg: #121212;
    --surface: #1e1e1e;

    --primary: #bd93f9;
    --primary-soft: rgba(189, 147, 249, 0.12);

    --text: #cbcaca;
    --text-strong: #f2f2f2;
    --text-muted: #8a8a8a;

    --border: #2d2e32;
    --border-strong: #4b3867;

    --font-mono: "Cascadia Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --radius: 6px;
    --sidebar-w: 250px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    margin: 0;
    overflow-x: hidden;
    overflow-x: clip;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a:hover {
    text-decoration: underline;
}

strong {
    color: var(--text-strong);
    font-weight: 600;
}

h1, h2, h3, h4 {
    line-height: 1.3;
}

ul, ol {
    margin: 0;
    padding: 0;
}

/* ---------- Scrollbar ---------- */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--surface);
}

*::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

*::-webkit-scrollbar-track {
    background: var(--surface);
}

*::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 20px;
    border: 3px solid var(--surface);
}

/* ---------- Layout ---------- */
.layout {
    flex: 1 0 auto;
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: max(0px, calc((100vw - 1280px) / 2));
    width: var(--sidebar-w);
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    border-right: none;
    background-color: var(--bg);
    box-shadow: none;
    z-index: 10;
}

.sidebar::after {
    content: "";
    position: absolute;
    top: 24px;
    right: 0;
    bottom: 24px;
    width: 1px;
    background: linear-gradient(
        to bottom,
        var(--border-strong),
        transparent
    );
}

.sidebar__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar__brand {
    width: 100%;
    text-align: right;
    margin: 7px 0 32px;
}

.brand-sub {
    margin: 0;
    font-size: 13px;
    color: var(--primary);
    margin-top: -3px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.nav-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.brand {

    font-size: 20px;
    color: var(--text-strong);
    text-decoration: none;
}

.brand .prompt {
    color: var(--primary);
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.nav__link {

    font-size: 15px;
    color: var(--text);
    padding: 9px 14px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-right: 2px solid transparent;
    border-radius: var(--radius) 0 0 var(--radius);
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.nav__icon {
    display: inline-flex;
    color: var(--text-muted);
    transition: color 0.15s;
}

.nav__icon svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linejoin: round;
    paint-order: stroke fill;
    display: block;
}

.nav__link:hover .nav__icon {
    color: var(--primary);
}

.nav__link.is-active .nav__icon {
    color: var(--primary);
}

.nav__link:hover {
    color: var(--text-strong);
    background-color: var(--surface);
    text-decoration: none;
}

.nav__link.is-active {
    color: var(--primary);
    background-color: var(--primary-soft);
    border-right-color: var(--primary);
}

/* ---------- Content ---------- */
.content {
    grid-column: 2;
    padding: 40px 48px 32px;
    min-width: 0;
}

.panel {
    display: none;
}

.panel.is-active {
    display: block;
    animation: fade-in 0.25s ease;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Page header ---------- */
.page-header {

    font-size: 20px;
    text-align: center;
    color: var(--text-strong);
    padding-bottom: 35px;
    margin: 0 0 -31px;
}

.page-header .prompt-prefix {
    color: var(--border-strong);
    font-weight: 700;
    margin-right: 1px;
}

.page-header .br {
    color: var(--border-strong);
    font-weight: 700;
}

.page-header + .section-title {
    margin-top: 25px;
}

/* ---------- Section title ---------- */
.section-title {

    font-size: 16px;
    color: var(--text-strong);
    margin: 50px 0 20px;
    display: flex;
    align-items: center;
    width: 100%;
    font-weight: 500;
}

.section-title .dash {
    flex: 1;
    border-bottom: 1px dashed var(--border-strong);
    min-width: 0;
}

.section-title .br {
    color: var(--border-strong);
    font-weight: 700;
}

.section-title .sep {
    width: 8px;
    flex-shrink: 0;
}

.section-title .prompt-prefix {
    color: var(--border-strong);
    margin-right: 1px;
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 3px 0 32px;
}

.hero__name {
    font-size: 28px;
    margin: 0 0 16px;
    color: var(--text-strong);
}

.hero__name span {
    color: var(--primary);
}

.hero__title {

    font-size: 18px;
    color: var(--primary);
    margin: 0;
}

.hero__disciplines {

    font-size: 13px;
    color: var(--text);
    margin: 0;
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    margin-bottom: 8px;
}

.profile-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
}

.about-grid__body .lead {
    font-size: 1.15em;
    color: var(--text-strong);
    margin-top: 0;
}

.about-grid__body p {
    margin: 0 0 14px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.stat {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 8px;
    text-align: center;
}

.stat__num {
    display: block;

    font-size: 22px;
    color: var(--primary);
}

.stat__label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ---------- Shared key-value component ---------- */
.kv {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.kv--centered {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
    margin: 0 auto 32px;
    max-width: 100%;
}

@media (min-width: 993px) {
    .kv--centered .kv__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .kv--centered .kv__key::after {
        display: none;
    }

    .kv--centered .kv__val {
        color: var(--text-muted);
        font-size: 14px;
    }
}

.kv__row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.kv__key {

    font-size: 15px;
    color: var(--primary);
    font-weight: normal;
    white-space: nowrap;
}

.kv__key::after {
    content: "\00b7";
    color: var(--primary);
    margin: 0 5px;
}

.kv__val {

    font-size: 14px;
    color: var(--text);
}

.kv__val:not(:last-child)::after {
    content: "\00b7";
    color: var(--primary);
    margin: 0 5px;
}

/* ---------- Social ---------- */
.social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.social a {

    font-size: 13px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 8px 16px;
    color: var(--text);
    transition: background-color 0.15s, color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.social__icon {
    width: 14px;
    height: 14px;
    fill: var(--primary);
    flex-shrink: 0;
}

.social a:hover {
    background-color: var(--primary);
    color: #000;
    text-decoration: none;
}

.social a:hover .social__icon {
    fill: #000;
}

/* ---------- Skills ---------- */
.card-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.card p {
    margin: 0;
    font-size: 14px;
}

/* ---------- Timeline (career) ---------- */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.timeline-item__meta {
    text-align: right;
}

.company {
    display: block;

    font-size: 16px;
    color: var(--primary);
    margin-bottom: 4px;
}

.timeline-item__dates {
    margin-top: 11px;
}

.period {
    display: block;
    font-size: 13px;
    line-height: 1;
    color: var(--text-strong);
    margin-bottom: 0;
}

.tenure {
    display: inline;
    font-size: 12px;
    color: var(--text-muted);
}

.location {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.tenure + .location {
    display: inline;
}

.tenure + .location::before {
    content: ", ";
}

.company-links {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.company-link {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: underline dashed;
    text-decoration-color: var(--text-muted);
    text-underline-offset: 2px;
    margin-top: 5px;
}

.company-link:hover {
    color: var(--primary);
    text-decoration: underline dashed;
    text-decoration-color: var(--primary);
}

.role {
    display: block;
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 4px;
}

.timeline-item__body p {
    margin: 0;
    font-size: 14px;
}

.education .timeline-item__dates {
    margin-top: 9px;
}

/* ---------- Projects ---------- */
.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.project {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.project__name {
    font-size: 16px;
    color: var(--primary);
    margin: 0;
}

.project__desc {
    font-size: 14px;
    margin: 0;
}

.project__tech {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.project__tech li {
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    color: var(--text-muted);
}

.project__link {

    font-size: 13px;
}

.project__info {
    display: block;
    font-size: 12px;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 10px;
}

.timeline-item__body .project__tech {
    margin-top: 10px;
}

.timeline-item__body .project__section-title  {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-strong);
    margin-top: 12px;
    margin-bottom: 0;
    color: var(--primary);
}

.project__section-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.project__section-list li {
    display: inline;
}

.project__section-list li::after {
    content: "\00b7";
    color: var(--primary);
    margin: 0 0 0 5px;
}

.project__section-list li:last-child::after {
    content: "";
    margin: 0;
}

/* ---------- Courses ---------- */
.lead {
    font-style: italic;
    color: var(--text-muted);
}

.lead a {
    color: var(--primary);
}

.courses {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.course {
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.course summary {

    font-size: 15px;
    color: var(--primary);
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course summary::-webkit-details-marker {
    display: none;
}

.course summary::after {
    content: "+";
    color: var(--primary);
    font-weight: 700;
}

.course[open] summary::after {
    content: "−";
}

.course__body {
    padding: 0 18px 18px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.course__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin: 16px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.course__body > .course__label:first-child {
    margin-top: 0;
}

.course__label + p {
    margin-top: 0;
}

.course__body p {
    margin-top: 0;
}

.course__body ul {
    padding-left: 2rem;
}

.course__body ol {
    padding-left: 3.5rem;
}

.course__body li {
    font-size: 14.5px;
    margin-bottom: 0;
}

.course__body > ol > li {
    margin-bottom: 8px;
}

/* ---------- Contact ---------- */
.contact-intro {
    margin: 32px auto 0;
    line-height: 1.7;
    text-align: center;
}

.contact-intro .highlight {
    color: var(--primary);
}

.contact-intro a {
    color: var(--primary);
    text-decoration: none;
}

.contact-intro a:hover {
    text-decoration: underline;
}

/* ---------- Footer ---------- */
.footer {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text);
    text-align: center;
}

.footer .highlight,
.footer a {
    color: var(--primary);
    text-decoration: none;
}

.footer a:hover {
    background-color: var(--primary);
    color: #000;
    text-decoration: none;
    border-radius: 3px;
    padding: 0 4px;
}

.footer__sep {
    color: var(--primary);
}

.footer .heart {
    color: var(--primary);
    font-size: 13px;
}
