/* 
  Enis Türkoğlu - Personal Website & Blog Theme (Dark Theme Only)
*/

@font-face {
  font-family: "iA Writer Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-400-normal.woff2") format("woff2"),
       url("https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-400-normal.woff") format("woff");
}

@font-face {
  font-family: "iA Writer Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-700-normal.woff2") format("woff2"),
       url("https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-700-normal.woff") format("woff");
}

@font-face {
  font-family: "iA Writer Mono";
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-400-italic.woff2") format("woff2"),
       url("https://cdn.jsdelivr.net/fontsource/fonts/ia-writer-mono@latest/latin-400-italic.woff") format("woff");
}

:root {
  color-scheme: dark;
  --white: #faf5f6;
  --transwhite: rgba(250, 245, 246, 0.7);
  --moretranswhite: rgba(250, 245, 246, 0.08);
  --black: #252525;
  --transblack: rgba(37, 37, 37, 0.85);
  --moretransblack: rgba(37, 37, 37, 0.5);
  --gray: #a4a4a4;
  --highlight: #e5ffc3;
  --red: #e4002b;
  --green: #24d05a;
  --pink: #eb4888;
  --blue: #10a2f5;
  --yellow: #e9bc3f;
}

::selection {
  background-color: var(--highlight);
  color: var(--black);
}

html, body {
  margin: auto;
  padding: 20px;
  max-width: 70ch;
  background-color: var(--black);
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--white);
  scroll-behavior: smooth;
  text-transform: lowercase; /* Everything lowercase */
}

html, body, button, code, input, select, textarea {
  font-family: "iA Writer Mono", "Space Mono", monospace;
  font-size: 15px;
}

h1, strong, b {
  color: var(--white);
}

h1 {
  font-weight: 400;
  scroll-margin-top: 3em;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
}

h2 {
  font-weight: 400;
  color: var(--gray);
  line-height: 1.1;
  margin: 0.5em 0;
}

h3 {
  color: var(--gray);
  line-height: 1.2;
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h4, h5, h6 {
  color: var(--gray);
  line-height: 1.1;
}

header {
  position: relative;
  margin-bottom: 1rem;
}

/* Header Section with Circular Profile Picture */
.header-section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 1rem;
}

.header-frame {
  width: 350px;
}

.header-frame h1 {
  font-size: 2.2rem;
  margin: 0;
  color: var(--white);
}

.header-frame h2 {
  font-size: 1.2rem;
  margin: 0.3em 0 0 0;
  white-space: pre-wrap;
  color: var(--gray);
}

.img-frame {
  border-radius: 50%;
  width: 170px;
  height: 170px;
  margin: 10px 0;
  position: relative;
  overflow: hidden;
  border: none;
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Navigation */
nav {
  position: sticky;
  top: 0;
  text-align: center;
  background: var(--transblack);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 100;
  padding: 10px 0;
  margin-bottom: 1.5rem;
}

nav a {
  display: inline-block;
  margin: 0.5rem 0;
  text-decoration: none;
  color: var(--white);
}

nav a:not(:last-child) {
  padding: 0 1rem 0 0;
}

nav a.active, nav a:hover {
  text-underline-offset: 0.3ex;
  font-weight: bolder;
  text-decoration: underline 0.3ex;
  color: var(--white);
}

@media (max-width: 650px) {
  nav {
    padding: 1rem 0 0;
  }
  nav a {
    margin: 0 0 1rem;
  }
}

a {
  color: var(--white);
  text-decoration-thickness: 0.3ex;
  text-underline-offset: 0.3ex;
  text-decoration: underline;
  transition: all 0.15s ease;
}

a:hover {
  font-weight: bold;
  color: var(--white);
}

hr {
  border: none;
  border-top: 1px solid var(--gray);
  width: 75%;
  margin: 1.5rem auto;
}

/* Posts List */
ul.posts-list, ul.tags-list, ul.year-list {
  padding: unset;
  list-style-type: none;
  margin: 1rem 0;
}

.post {
  margin: 0 0 30px 0;
}

.post .title {
  font-size: 1.25em;
  text-decoration: underline;
  font-weight: 700;
  color: var(--white);
}

.post time {
  color: var(--gray);
  font-style: italic;
  font-size: 0.9em;
  margin-left: 8px;
  white-space: nowrap;
}

.post .excerpt {
  color: var(--gray);
  display: inline-block;
  margin: 4px 0 6px 0;
  font-size: 0.95em;
}

/* Tags (Pure inline hashtags) */
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.tags.center {
  max-width: 50ch;
  color: var(--white);
  margin: 0 auto;
}

.tag {
  display: inline-block;
  margin: auto 8px;
  color: var(--white);
  font-size: 0.85rem;
  text-decoration: none;
}

.tag:hover {
  cursor: pointer;
  font-weight: bold;
  text-decoration: underline;
}

.tag.posty {
  margin-left: 0;
  margin-right: 12px;
}

.tag-title {
  color: var(--white);
  font-weight: 400;
  text-align: center;
}

/* Content & Typography */
main, content {
  line-height: 1.6;
}

article :not(.article-title) {
  line-height: 1.8;
}

.article-title {
  font-size: 2em;
  margin: 0.25em 0;
  font-weight: 700;
  color: var(--white);
}

.article-meta {
  color: var(--gray);
  font-style: italic;
  font-size: 0.9em;
  margin-bottom: 1.5rem;
}

img {
  max-width: 100%;
  height: auto;
}

code {
  padding: 2px 5px;
  background-color: var(--moretranswhite);
  color: var(--white);
  font-weight: bold;
  border-radius: 2px;
}

pre {
  background-color: var(--moretranswhite);
  color: var(--white);
  tab-size: 2;
  padding: 1rem;
  overflow: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
}

pre > code {
  all: unset;
}

blockquote {
  background: var(--moretranswhite);
  border-left: 0.5ex solid var(--gray);
  color: var(--white);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  margin: 1.5rem 0;
  padding: 15px 20px;
  font-style: italic;
}

blockquote p {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 1rem;
}

table, th, td {
  border: 1px solid var(--gray);
  line-height: 1.4;
  padding: 6px 10px;
  color: var(--white);
}

thead {
  background-color: var(--moretranswhite);
}

mark, .highlight-text {
  background-color: var(--highlight);
  color: var(--black);
  padding: 1px 4px;
}

/* Inputs & Search */
input[type="text"], input[type="email"], input[type="search"], textarea {
  background: #18181b;
  color: var(--white);
  border: none;
  border-bottom: 0.2em solid var(--gray);
  max-width: 280px;
  height: 1.8em;
  padding: 0 0.4em;
  font-size: 0.95rem;
  text-transform: lowercase;
}

input:focus, textarea:focus {
  outline: none;
}

.search-container {
  text-align: center;
  margin: 1.5rem 0;
}

.center {
  text-align: center;
}

footer {
  text-align: center;
  padding: 2.5rem 0 1.5rem 0;
  font-size: 0.85rem;
  color: var(--gray);
  border-top: 1px dashed var(--gray);
  margin-top: 3rem;
}

footer a {
  color: var(--white);
}

.theme-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 0;
}
