:root {
	--page-max-width: 1750px;
	--gap: 1rem;
	--card-radius: 20px;
	--card-shadow: 0 6px 18px rgba(17, 24, 39, 0.15);
	--card-shadow-hover: 0 10px 30px rgba(17, 24, 39, 0.25);
	--accent: white;
	--muted: #d1d5db;
	--text: white;
	--sidebar-width: 270px;
}

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

.log-container {
	max-width: var(--page-max-width);
	margin: 0 auto;
	padding-right: calc(var(--sidebar-width) + 1rem);
}

.log-main {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.page-title {
	text-align: left;
	color: #000080;
	font-family: 'Lucida Sans', Geneva, Verdana, sans-serif;
}

.log-grid {
	display: flex;
	flex-wrap: wrap;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--gap);
	align-items: start;
}

.log-card {
	flex: 0 0 270px;
	max-width: 340px;
	position: relative;
	display: flex;
	flex-direction: column;
	background: #000080;
	overflow: hidden;
	text-decoration: none;
	color: inherit;

	border-top: 2px solid #ffffff;
	border-left: 2px solid #ffffff;
	border-right: 2px solid #000080;
	border-bottom: 2px solid #000080;

	box-shadow:
	2px 2px 0 #ffffff,
    2px 2px 0 #000080;

	transition: transform 0.15s ease, box-shadow 0.15s ease;
}


.log-card:hover {
  transform: translate(2px, 2px);
  box-shadow: none;
  border-top-color: #000000;
  border-left-color: #000000;
  border-bottom-color: #ffffff;
  border-right-color: #ffffff;
}

.log-card::before {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.4),
              inset -1px -1px 0 rgba(0,0,0,0.4);
  pointer-events: none;
}

.log-thumb {
	width: 100%;
	height: 140px;
	object-fit: cover;
	display: block;
}

.log-content {
	padding: 0.85rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	flex: 1;
}

.log-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: bold;
	line-height: 1.2;
	color: var(--text);
}

.log-meta {
	font-size: 0.82rem;
	color: var(--muted);
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.log-meta .author,
.log-meta .categories,
.log-meta .tags {
	color: white;
}

.log-summary {
	margin: 0;
	color: white;
	font-size: 0.92rem;
	line-height: 1.35;
	line-height: 1.5;
	letter-spacing: 0.2px;
}

.read-more {
	margin-top: auto;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--accent);
	text-align: right;
	text-decoration: none;
}

.read-more:hover {
	color: red;
}

.sidebar-right {
  position: fixed;
  top: 100px;
  right: 0;
  bottom: 50px;
  width: var(--sidebar-width);
  padding: 1rem;
  background-color: #000080;
  overflow-y: auto;

  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000080;
  border-bottom: 2px solid #000080;

  box-shadow:
    2px 2px 0 #ffffff,
    4px 4px 0 #000080;
}

.sidebar-right h3 {
	margin-top: 2rem;
	color: white;
	border-bottom: 1px solid white;
}

.sidebar-right::before {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 1px 1px 0 #ffffff,
              inset -1px -1px 0 #000000;
  pointer-events: none;
}

.sidebar-right::-webkit-scrollbar {
  width: 10px;
}
.sidebar-right::-webkit-scrollbar-track {
  background: #000080;
}
.sidebar-right::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border: 2px solid #000080;
}

.search-box input {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid white;
	background: #c0c0c0;
}

.tags-box ul,
.categories-box ul {
	list-style: none;
	padding-left: 10px;
	margin-top: 0.5rem;
}

.tags-box li,
.categories-box li {
	display: inline-block;
	margin: 0.25rem;
}

.tags-box a,
.categories-box a {
	text-decoration: none;
	color: white;
	font-size: 0.85rem;
}

.tags-box a:hover,
.categories-box a:hover {
	color: red;
}

.tag-link.active,
.category-link.active {
	color: red;
	font-weight: bold;
}

@media (max-width: 1024px) {
	.log-container {
		padding-right: 0;
	}

	.sidebar-right {
		position: static;
		width: 100%;
		margin-top: 2rem;
	}
}

@media (max-width: 640px) {
	.log-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}

	.log-thumb {
		height: 160px;
	}

	.page-title {
		font-size: 1.4rem;
	}
}
