:root {
	--bg: #f9f9f9;
	--text: #333;
	--card: #fff;
	--border: #ddd;
	--accent: #333;
}

body.dark {
	--bg: #1e1e1e;
	--text: #eee;
	--card: #2a2a2a;
	--border: #444;
	--accent: #eee;
}

body {
	margin: 0;
	font-family: 'Segoe UI', sans-serif;
	background: var(--bg);
	color: var(--text);
	transition: background 0.3s, color 0.3s;
}

header {

	background: #fff;
	padding: 1rem 2rem;
	border-bottom: 1px solid #ddd;
	position: sticky;
	top: 0;
	z-index: 9999;
	transition: padding 0.3s ease, background 0.3s ease;
}

	header .wrap {
		max-width: 1248px;
		margin: 0 auto;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

header.shrink {
	padding: 0.25rem 2rem;
	background: var(--card);
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}


	header .logo {
		display: flex;
		align-items: center;
		gap: 0.5rem;
		text-decoration: none;
	}

	header .site-name {
		font-size: 1.5rem;
		font-weight: bold;
	}

	header svg {
		height: 50px;
		transition: height .5s;
	}

	header.shrink svg {
		height: 30px;
	}

	header .sceleton {
		fill: #394049;
		transition: fill;
	}
	
	body.dark header .sceleton {
		fill: #bbbbbb;
	}

nav {
	margin-left: auto;
}

	nav ul {
		list-style: none;
		display: flex;
		gap: 1.5rem;
		margin: 0;
		padding: 0;
	}

	nav a {
		font-weight: 500;
		position: relative;
		text-decoration: none;
		color: var(--accent);
		transition: color 0.3s ease;
	}

	nav a.active:after {
		transform: scaleX(1);
	}

	nav a::after {
		content: "";
		position: absolute;
		left: 0;
		bottom: -4px;
		width: 100%;
		height: 2px;
		background: var(--accent);
		transform: scaleX(0);
		transform-origin: left;
		transition: transform 0.3s ease;
	}

	nav a:hover::after {
		transform: scaleX(1);
	}

main {
    padding: 2rem;
    max-width: 980px;
    margin: 0 auto;
}
	
	main a {
		text-decoration: none;
		color: #003d89;
	}
	
	main section {
		margin-bottom: 1em;
	}

.posts article {
	display: flex;
	gap: 1rem;
	background: #fff;
	padding: 1rem;
	margin-bottom: 1rem;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cover {
	width: 120px;
	height: 80px;
	background: linear-gradient(135deg, var(--border), var(--card));
	background-size: cover;
	background-position: center center;
	border-radius: 4px;
	flex-shrink: 0;
	filter: grayscale(0);
	transition: filter, box-shadow 0.3s ease;
}

body.dark .cover {
	filter: grayscale(1);
}

.cover:hover {
	box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.post-content h2 {
	margin: 0 0 0.5rem;
	color: var(--text);
}

.date {
	font-size: 0.9rem;
	color: #777;
	margin-bottom: 0.5rem;
}

footer {
	background: #fff;
	padding: 2rem;
	border-top: 1px solid #ddd;
}

	footer .wrap {
		max-width: 1248px;
		margin: 0 auto;
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
	}

.about {
	max-width: 300px;
}

.social a {
	margin-right: 1rem;
	display: inline-block;
}

.social a svg {
	transition: transform 0.3s ease, fill 0.3s ease;
}

.social a:hover svg {
	transform: scale(1.2);
	fill: #0077b5;
}

header, footer {
	background: var(--card);
	border-color: var(--border);
}

nav a, .site-name, .date, .social svg {
	color: var(--accent);
}

.posts article {
	background: var(--card);
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* effects */

.fadeInUp {
	opacity: 0;
	transform: translateY(20px);
	animation: fadeInUp 0.6s ease-out both;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}


#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
  padding: 0 0 0 1.5rem;
}

#theme-toggle:hover {
  transform: rotate(20deg);
}

#theme-toggle path {
	display: none;
}

body.light #theme-toggle path.light { display: initial; }
body.dark #theme-toggle path.dark { display: initial; }

/* pagination */

.pagination {
	display: flex;
	justify-content: center;
	margin: 2rem 0;
}

	.pagination ul {
		list-style: none;
		display: flex;
		gap: 0.5rem;
		padding: 0;
		margin: 0;
	}

	.pagination a, .pagination span {
		display: inline-block;
		padding: 0.5rem 0.75rem;
		border-radius: 4px;
		text-decoration: none;
		color: var(--accent);
		background: var(--card);
		border: 1px solid var(--border);
		transition: background 0.3s ease, color 0.3s ease;
	}

	.pagination a:hover {
		background: var(--accent);
		color: var(--bg);
	}

	.pagination .active {
		background: var(--accent);
		color: var(--bg);
		pointer-events: none;
	}

	.pagination .dots {
		padding: 0.5rem 0.75rem;
		color: var(--text);
		opacity: 0.6;
	}
	
.single-post {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  animation: fadeInUp 0.6s ease-out both;
}

.single-post .cover {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, var(--border), var(--card));
  border-radius: 6px;
  margin-bottom: 1.5rem;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.single-post article h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.single-post article p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.meta {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.tags span {
  background: var(--border);
  color: var(--text);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  transition: background 0.3s ease;
}

.tags span:hover {
  background: var(--accent);
  color: var(--bg);
}

.comments {
  margin-top: 1rem;
}

.comments h3 {
  margin-bottom: 1rem;
}

.comment {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  animation: fadeInUp 0.5s ease-out both;
}

.comment-form {
  margin-top: 2rem;
  animation: fadeInUp 0.6s ease-out both;
}

.comment-form h3 {
  margin-bottom: 1rem;
}

.comment-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-form input,
.comment-form textarea {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  transition: border 0.3s ease, background 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.comment-form button {
  align-self: flex-start;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.comment-form button:hover {
  background: #555;
}
		
@media only screen and (max-width: 768px) {
	
	header {
	flex-wrap: wrap;
	}

}

@media only screen and (max-width: 488px) {
	
	header .site-name {
		display: none;
	}
	
	.posts article {
		flex-direction: column;
	}
	
	.cover {
		width: 100%;
		height: 165px;
	}

}