/* ============================================================
   POTAMITIS THEME — style.css
   ============================================================ */

/* ------------------------------------------------------------
   CSS CUSTOM PROPERTIES
   ------------------------------------------------------------ */
:root {
	--color-bg:         #faf9f5;
	--color-text:       #3e3d3b;
	--color-text-dark:  #000000;
	--color-grey:       #adaba2;
	--color-border:     #e8e6dc;

	--font-sans:  'Inter', sans-serif;
	--font-mono:  'Fira Code', monospace;

	--sidebar-width: 220px;
	--content-max:   600px;
	--space:         1.5rem;

	--text-h1: 2.027em;
	--text-h2: 1.802em;
	--text-h3: 1.602em;
	--text-h4: 1.424em;
	--text-h5: 1.266em;
	--text-h6: 1.125em;
	--text-md: 1em;
	--text-sm: 0.889em;
	--text-xs: 0.79em;

	--border-radius: 6px;
}

/* ------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
html {
	font-size: 100%;
	scroll-behavior: smooth;
}
body {
	font-family: var(--font-sans);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.65;
	color: var(--color-text);
	background-color: var(--color-bg);
	-webkit-font-smoothing: antialiased;
}
img {
	max-width: 100%;
	height: auto;
	display: block;
}
h1, h2, h3, h4, h5, h6 {
	font-weight: 600;
	line-height: 1.2;
	color: var(--color-text-dark);
  text-wrap: balance;
  overflow-wrap: break-word;
}
p {
  text-wrap: pretty;
  overflow-wrap: break-word;
}
a {
	color: inherit;
	text-decoration: none;
	transition: all 0.15s ease;
}
a:hover {
	color: var(--color-text-dark);
}
ul {
	list-style: none;
}
strong {
  font-weight: 600;
}
section {
	margin-bottom: 4rem;
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-h5); }
h6 { font-size: var(--text-h6); }
p { font-size: var(--text-md); }
small { font-size: var(--text-sm); }
.read-more {
	font-size: var(--text-sm);
	color: var(--color-grey);
	text-decoration: underline;
	text-decoration-color: var(--color-border);
	text-decoration-style: dashed;
}
.no-content {
	color: var(--color-grey);
	font-size: var(--text-sm);
}
.table-container {
	display: block;
	width: 100%;
  overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: var(--space);
}
.hide {
	display: none;
}
@media (max-width: 768px) {
	.hide-on-mobile {
		display: none;
	}
	.show-on-mobile {
		display: block;
	}
}

/* ------------------------------------------------------------
   LAYOUT
   ------------------------------------------------------------ */
.layout {
	display: grid;
	grid-template-columns: var(--sidebar-width) 1fr;
	min-height: 100vh;
	max-width: calc(var(--sidebar-width) + (var(--content-max) + 6rem));
	margin-inline: auto;
}
@media (max-width: 768px) {
	.layout {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
	}
}

/* ------------------------------------------------------------
   SIDEBAR
   ------------------------------------------------------------ */
.sidebar {
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	border-right: 1px dashed var(--color-border);
	padding: 2.5rem 1.5rem;
}
.sidebar-inner {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}
.profile-photo {
	width: 174px;
	height: 174px;
	border-radius: var(--border-radius);
	object-fit: cover;
	margin-bottom: 0.75rem;
}
.profile-name {
	display: block;
	font-weight: 500;
	color: var(--color-text-dark);
}
.profile-tagline {
	display: block;
	color: var(--color-grey);
}
.sidebar-nav ul {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}
.sidebar-nav a {
	display: block;
	padding: 0.25rem 0;
}
.sidebar-nav a[aria-current="page"] {
	color: var(--color-text-dark);
}
.sidebar-contact-label {
	display: block;
	color: var(--color-grey);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 0.25rem;
}
.sidebar-contact a {
	display: block;
  padding: 0.25rem 0;
}
@media (max-width: 768px) {
	.sidebar {
		position: static;
		height: auto;
		border-right: none;
		border-bottom: 1px dashed var(--color-border);
		padding: 1.25rem 1.5rem;
	}
	.sidebar-inner {
		flex-direction: column;
		flex-wrap: wrap;
		align-items: center;
		gap: 1.5rem;
	}
	.sidebar-profile {
		display: flex;
		gap: 0.75rem;
	}
	.profile-photo {
		width: 44px;
		height: 44px;
		margin-bottom: 0;
		border-radius: 50%;
	}
	.profile-tagline {
		margin-top: 0;
	}
	.sidebar-nav ul {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 1.5rem;
	}
	.sidebar-nav a {
		opacity: .6;
	}
	.sidebar-nav a:hover {
		opacity: 1;
	}
	.sidebar-nav a[aria-current="page"] {
		opacity: 1;
	}
}

/* ------------------------------------------------------------
   MAIN CONTENT
   ------------------------------------------------------------ */
.main {
	padding: 2.5rem 3rem;
	max-width: calc(var(--content-max) + 6rem);
	overflow: hidden;
}
@media (max-width: 768px) {
	.main {
		padding: 1.5rem;
	}
}

/* ------------------------------------------------------------
   CTA CALL BUTTON
   ------------------------------------------------------------ */
.btn-call {
	display: flex!important;
	opacity: 1!important;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 0.3rem 0.5rem!important;
	margin-top: 0.75rem;
	background: var(--color-text-dark);
	color: var(--color-bg);
	border-radius: var(--border-radius);
	font-size: .725rem;
	font-weight: 500;
	text-decoration: none;
	transition: opacity 0.15s ease;
}
.btn-call:hover {
	color: var(--color-bg);
	opacity: 0.75!important;
}

/* ------------------------------------------------------------
   LABELS
   ------------------------------------------------------------ */
.label {
	color: var(--color-grey);
	margin-bottom: 1rem;
	display: inline-block;
}
.label-link {
	text-decoration: underline;
	text-decoration-color: var(--color-border);
	text-decoration-style: dashed;
}
.label-link > sup {
	font-size: var(--text-xs);
}

/* ------------------------------------------------------------
   POST LIST
   ------------------------------------------------------------ */
.post-item {
	margin-bottom: 2rem;
}
.post-item.grid {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1rem;
}
.post-item:last-of-type {
	margin-bottom: 0;
}
.post-date {
	color: var(--color-grey);
	font-size: var(--text-sm);
	min-width: 72px;
}
.post-title {
	font-size: var(--text-md);
	font-weight: 500;
	margin-bottom: 0.3rem;
}
.post-title > sup {
	position: absolute;
	color: var(--color-grey);
  margin-left: -18px;
  font-size: var(--text-xs);
  width: 14px;
  text-align: right;
}
.post-title + .post-title {
	padding-top: 1rem;
}
@media (max-width: 768px) {
	.post-item.grid {
		grid-template-columns: 1fr;
		gap: 0;
	}
}

/* ------------------------------------------------------------
   HOME
   ------------------------------------------------------------ */
.home-title {
	font-size: var(--text-h4);
	font-weight: 600;
	margin-bottom: 1rem;
}

/* ------------------------------------------------------------
   GALLERY
   ------------------------------------------------------------ */
.gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}
.gallery img {
	border-radius: var(--border-radius);
}
.gallery figcaption {
	padding-top: .4rem;
	font-size: var(--text-xs);
	font-family: var(--font-mono);
	line-height: 1.1;
}
.gallery figcaption p {
	display: inline;
}
@media (max-width: 920px) {
	.gallery {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
}
@media (max-width: 420px) {
	.gallery {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
}

/* ------------------------------------------------------------
   CV
   ------------------------------------------------------------ */
.cv .post-title {
	margin-top: 0;
}
.cv .post-item.grid {
	grid-template-columns: 100px 1fr;
}

@media (max-width: 768px) {
	.cv .post-item.grid {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------
   PAGE
   ------------------------------------------------------------ */
.page-header {
	margin-bottom: 2rem;
}
.page-content {
	margin-bottom: 3rem;
}
.page-body h2,
.page-body h3,
.page-body h4 {
	font-weight: 500;
	color: var(--color-text-dark);
	margin-top: 2rem;
	margin-bottom: 0.75rem;
}
.page-body h2 { font-size: 1.1rem; }
.page-body h3 { font-size: 1rem; }
.page-body p {
	margin-bottom: 1.25rem;
}
.page-body a {
	text-decoration: underline;
	text-decoration-color: var(--color-border);
	text-decoration-style: dashed;
}
.page-body ul,
.page-body ol {
	padding-left: 1.5rem;
	margin-bottom: 1.25rem;
}
.page-body ul { list-style: disc; }
.page-body ol { list-style: decimal; }
.page-body li {
	margin-bottom: 0.4rem;
}
.page-body blockquote {
	border-left: 2px dashed var(--color-border);
	padding-left: 1.25rem;
	margin: 1.5rem 0;
	font-style: italic;
}
.page-body pre,
.page-body code {
	font-family: var(--font-mono);
	font-size: 0.875rem;
	background: #f0ede4;
	border-radius: var(--border-radius);
}
.page-body pre {
	padding: 1rem 1.25rem;
	overflow-x: auto;
	margin-bottom: 1.25rem;
}
.page-body code {
	padding: 0.15em 0.4em;
}
.page-body img {
	border-radius: var(--border-radius);
	margin: 1.5rem 0;
}
.page-body table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
	font-size: var(--text-sm);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
}
.page-body thead {
	background-color: var(--color-border);
}
.page-body th {
	text-align: left;
	font-weight: 600;
	color: var(--color-text-dark);
	padding: 0.6rem 0.85rem;
	border: none;
	white-space: nowrap;
}
.page-body td {
	padding: 0.5rem 0.85rem;
	vertical-align: top;
	border: none;
}
.page-body tbody tr:nth-child(even) {
	background-color: color-mix(in srgb, var(--color-border) 30%, transparent);
}

/* ------------------------------------------------------------
   PAGINATION
   ------------------------------------------------------------ */
.pagination {
	font-size: var(--text-sm);
	display: flex;
	gap: 1rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px dashed var(--color-border);
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.site-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 3rem;
	border-top: 1px dashed var(--color-border);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--color-grey);
}

.footer-copy {
	color: var(--color-grey);
}

.footer-links {
	display: flex;
	gap: 1.25rem;
}

.footer-links a {
	color: var(--color-grey);
	transition: color 0.15s ease;
}

.footer-links a:hover {
	color: var(--color-text-dark);
}
@media (max-width: 768px) {
	.site-footer {
		padding: 1rem 1.5rem;
		flex-direction: column;
		gap: 1rem;
		align-items: center;
		text-align: center;
	}
	.footer-contact {
		display: flex;
		flex-direction: column;
		gap: 0.4rem;
	}
}