:root {
    --bg-main: #0d1117;       /* GitHub Dark bg */
    --bg-panel: #161b22;      /* GitHub Dark panel */
    --bg-darker: #010409;     /* Deep dark for contrast */
    --border: #30363d;
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    
    /* Code syntax colors */
    --c-keyword: #ff7b72;
    --c-string: #a5d6ff;
    --c-function: #d2a8ff;
    --c-variable: #79c0ff;
    --c-comment: #8b949e;

    /* Accents */
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-orange: #d29922;
    --accent-purple: #bc8cff;
    --accent-pink: #f778ba;
    --accent-yellow: #e3b341;

    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', Courier, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Edge */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
}

/* Colors */
.text-blue { color: var(--accent-blue); }
.text-green { color: var(--accent-green); }
.text-orange { color: var(--accent-orange); }
.text-purple { color: var(--accent-purple); }
.text-pink { color: var(--accent-pink); }
.text-yellow { color: var(--accent-yellow); }
.text-muted { color: var(--text-muted); }

a {
    color: var(--accent-blue);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Layout Wrapper */
.layout-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ==========================================
   LEFT SIDEBAR
   ========================================== */
.sidebar-profile {
    width: 320px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.profile-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border);
}

.avatar-square {
    width: 100px;
    height: 100px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    margin: 0 auto 15px auto;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.profile-name {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 5px;
}
.profile-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.profile-location {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.side-block {
    margin-bottom: 25px;
}
.block-label {
    font-size: 0.85rem;
    color: var(--c-comment);
    margin-bottom: 10px;
}

/* Contact List */
.contact-list {
    list-style: none;
    font-size: 0.85rem;
}
.contact-list li {
    margin-bottom: 6px;
}
.c-key { color: var(--c-variable); }
.c-val { color: var(--c-string); }

/* Skills Bar */
.skill-group {
    margin-bottom: 12px;
}
.s-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-main);
    margin-bottom: 4px;
}
.s-bar {
    height: 6px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.s-fill {
    height: 100%;
}

/* Tag list */
.lang-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
}

/* ==========================================
   RIGHT CONTENT
   ========================================== */
.main-content {
    flex-grow: 1;
    padding: 0;
    background-color: var(--bg-main);
    min-width: 0; /* Prevents overflow issues */
}

/* Top Nav Tabs */
.top-nav {
    display: flex;
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px 0 20px;
    gap: 5px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.top-nav a {
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-darker);
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}
.top-nav a:hover {
    text-decoration: none;
    background: var(--bg-panel);
}
.top-nav a.active {
    color: var(--text-main);
    background: var(--bg-main);
    border-color: var(--border);
}

/* Content Panel */
.content-panel {
    margin: 30px 40px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5); /* Flat subtle shadow instead of neon */
}

.panel-tab {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 8px 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-body {
    padding: 25px 30px;
}
.bg-darker {
    background-color: var(--bg-darker);
}

/* Markdown styling (About) */
.markdown-h1 {
    font-size: 1.5rem;
    color: var(--c-keyword);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}
.markdown-p {
    margin-bottom: 15px;
    color: var(--text-main);
}
.markdown-h3 {
    font-size: 1.1rem;
    color: var(--accent-blue);
    margin: 20px 0 10px 0;
}
.markdown-ul {
    padding-left: 20px;
    list-style: square;
    color: var(--text-muted);
}
.markdown-ul li { margin-bottom: 5px; }

/* About Gallery (Plan B) */
.about-gallery {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}
.img-frame {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    flex: 1;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s, border-color 0.3s;
}
.img-frame:hover {
    transform: translateY(-5px);
    border-color: var(--text-muted);
}
.frame-top {
    background: var(--bg-darker);
    padding: 6px 10px;
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border);
}
.frame-top .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.img-frame img {
    width: 100%;
    height: 180px; /* Görselleri orantılı sığdırmak için */
    object-fit: cover;
    display: block;
    opacity: 0.75;
    transition: opacity 0.3s;
}
.img-frame:hover img {
    opacity: 1;
}

/* Timeline (Experience) */
.timeline-item {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--border);
    margin-bottom: 30px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--accent-green);
    border-radius: 50%;
}
.t-date {
    font-size: 0.8rem;
    color: var(--c-comment);
    margin-bottom: 5px;
}
.t-role {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 10px;
}
.t-org {
    font-size: 0.95rem;
    color: var(--accent-orange);
    font-weight: 400;
}
.t-desc {
    padding-left: 15px;
    list-style: circle;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.t-desc li { margin-bottom: 6px; }

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.proj-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 6px;
    transition: border-color 0.2s;
}
.proj-card:hover {
    border-color: var(--text-muted);
}
.p-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.p-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    height: 4.5em; /* roughly 3 lines */
    overflow: hidden;
}
.p-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.p-tech span {
    font-size: 0.7rem;
    color: var(--bg-main);
    background: var(--text-muted);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
}

/* Education SQL */
.db-row {
    margin-bottom: 25px;
}
.db-cell.primary {
    font-size: 0.85rem;
    color: var(--c-keyword);
    margin-bottom: 8px;
}
.db-cell strong {
    color: var(--accent-blue);
    font-size: 1.05rem;
}
.tags-small {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tags-small span {
    font-size: 0.75rem;
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
}

/* Terminal Text (Certificates) */
.prompt {
    color: var(--accent-green);
    margin-bottom: 15px;
}
.cli-list {
    list-style: none;
    color: var(--text-main);
}
.cli-list li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}
.cli-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* Closing Signature (Plan C) */
.closing-signature {
    margin: 10px 40px 40px;
    display: flex;
    justify-content: center;
}

.closing-shell {
    width: min(100%, 980px);
}

.closing-label {
    color: var(--c-comment);
    font-size: 0.82rem;
    margin: 0 0 10px 4px;
}

.closing-frame {
    margin: 0;
    position: relative;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #000;
    overflow: hidden;
    aspect-ratio: 21 / 8;
    isolation: isolate;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.closing-frame::before {
    content: '';
    position: absolute;
    inset: -8%;
    z-index: 0;
    background-image: var(--closing-image);
    background-size: cover;
    background-position: center;
    filter: blur(26px) saturate(0.95) brightness(0.6);
    transform: scale(1.08);
}

.closing-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(90deg,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(0, 0, 0, 0.45) 12%,
            rgba(0, 0, 0, 0) 24%,
            rgba(0, 0, 0, 0) 76%,
            rgba(0, 0, 0, 0.45) 88%,
            rgba(0, 0, 0, 0.95) 100%
        ),
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.55) 0%,
            rgba(0, 0, 0, 0.15) 22%,
            rgba(0, 0, 0, 0.15) 78%,
            rgba(0, 0, 0, 0.6) 100%
        );
}

.closing-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    position: relative;
    z-index: 2;
    display: block;
    filter: saturate(1.06) contrast(1.08);
}

.closing-note {
    text-align: center;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* CV Button Sidebar */
.btn-download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-darker);
    color: var(--accent-green);
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-green);
    font-family: var(--font-mono);
}
.btn-download:hover {
    background: var(--accent-green);
    color: var(--bg-main);
    box-shadow: 0 0 12px rgba(63, 185, 80, 0.4);
}
.icon-download {
    font-style: normal;
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
    60% { transform: translateY(-2px); }
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .layout-wrapper {
        flex-direction: column;
    }
    .sidebar-profile {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 20px 15px; /* Daha az padding (mobil) */
    }
    .avatar-square {
        width: 80px;
        height: 80px;
    }
    .main-content {
        padding-top: 5px;
    }
    .top-nav {
        position: sticky;
        top: 0;
        z-index: 50;
        display: flex;
        overflow-x: auto; /* Telefondan parmakla kaydırılabilen menü */
        white-space: nowrap;
        padding: 10px 15px 0 15px;
        -webkit-overflow-scrolling: touch; /* iOS Native Scrolling */
    }
    .top-nav a {
        padding: 8px 12px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    .content-panel {
        margin: 15px;
        border-radius: 4px;
    }
    .closing-signature {
        margin: 0 15px 25px;
    }
    .panel-body {
        padding: 15px 15px; /* Kutuların iç yüzeyi telefonlar için daraltıldı */
    }
    .markdown-h1 {
        font-size: 1.25rem;
    }
}
