/*
Theme Name: Simple As Shit - Black
Theme URI: http://ramesh.my
Description: A Dark Version of Simple As Shit for my Blog - single column profile layout
Version: Version 3.0
Author: ramesh
Author URI: http://ramesh.my
*/

/* =====================================================
   GOOGLE FONT — to change the site font, do two things:
   1. Update the @import URL below with the new font name
      (use fonts.google.com to find the exact URL)
   2. Update the --theme-font variable value below
   Everything across all pages will update automatically.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Lora:ital,wght@0,400;0,600;1,400&family=Fira+Code:wght@400;500&display=swap');

:root {
	--theme-font:       'Ubuntu', sans-serif;  /* <-- change font name here */
	--theme-font-code:  'Fira Code', monospace;
	--theme-font-quote: 'Lora', serif;

	/* ---- LAYOUT WIDTH ------------------------------------------
	   --content-width is the width of the post text/images/videos
	   area (your media is 640px). The panel and page width are
	   worked out from it automatically — change this one value
	   to resize the whole layout.                                */
	--content-width:   640px;
	--panel-pad:       22px;
	--wrap-width:      calc(var(--content-width) + (var(--panel-pad) * 2) + 2px);

	--color-bg-page:        #242426;  /* outer page background (dark grey) */
	--color-bg-panel:       #111111;  /* panels (near black)               */
	--color-bg-inset:       #0a0a0a;  /* search box, code blocks           */
	--color-border-panel:   #2f2f31;
	--color-border-input:   #4a4a4a;
	--color-border-img:     #555555;  /* thumbnails on the front page        */
	--color-border-media:   #303032;  /* images / videos inside posts (dark grey, almost black) */
	--color-border-line:    #383838;

	--color-text-primary:   #ffffff;
	--color-text-body:      #dcdcdc;
	--color-text-page:      #bdbdbd;
	--color-text-meta:      #a4a4a4;
	--color-text-dim:       #8e8e8e;
	--color-nav-sep:        #8a8a8a;

	--color-link:           #ffffff;
	--color-link-hover:     #FF8C42;  /* <-- change hover colour here */
	--color-highlight:      #FFD84D;  /* yellow: the name in the bio */
}

/* =====================================================
   BASE
   font variable set here flows into every template
   automatically — no hardcoding needed in any PHP file.
   ===================================================== */

html {
	background-color: var(--color-bg-page);
}

body {
	margin: 0;
	padding: 0 12px;
	background-color: var(--color-bg-page);
	font-family: var(--theme-font);
	font-size: 14px;
	line-height: 1.55;
	color: var(--color-text-page);
}

input, button, select, textarea {
	font-family: var(--theme-font);
}

img {
	border: 0;
}

/* =====================================================
   LAYOUT — page wrapper and panels
   ===================================================== */

.wrap {
	box-sizing: border-box;
	max-width: var(--wrap-width);
	margin: 0 auto;
	padding: 24px 0 40px 0;
}

.panel {
	box-sizing: border-box;
	background-color: var(--color-bg-panel);
	border: 1px solid var(--color-border-panel);
	border-radius: 14px;
}

.main-panel {
	margin-top: 14px;
	padding: 20px var(--panel-pad) 22px var(--panel-pad);
}

/* =====================================================
   LINKS
   ===================================================== */

a,
a:visited {
	color: var(--color-link);
	text-decoration: none;
}

a:hover {
	color: var(--color-link-hover);
	text-decoration: underline;
}

/* =====================================================
   PROFILE PANEL (header)
   ===================================================== */

.profile {
	padding: 18px var(--panel-pad);
}

.profile-top {
	display: flex;
	gap: 16px;
	align-items: center;
}

.profile-photo-link {
	flex: 0 0 auto;
	display: block;
	line-height: 0;
}

.profile-photo {
	display: block;
	width: 80px;
	height: 80px;
	object-fit: cover;
	object-position: center top;
	border-radius: 12px;  /* rounded square; 0 = sharp corners, 50% = circle */
	border: 2px solid var(--color-border-input);
}

.profile-info {
	flex: 1 1 auto;
	min-width: 0;
}

.profile-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 12px;
}

.profile-name,
.profile-name a,
.profile-name a:visited {
	font-size: 22px;
	font-weight: 700;
	color: var(--color-text-primary);
	text-decoration: none;
}

.profile-name a:hover {
	color: var(--color-link-hover);
}

.profile-bio {
	margin: 4px 0 0 0;
	font-weight: 300;
	color: var(--color-text-body);
}

.profile-bio .bio-name {
	color: var(--color-highlight);
}

/* ---- Search box ---- */
.search-form {
	margin: 0;
	padding: 0;
	flex: 0 0 auto;
}

input.sbox {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	width: 120px;
	height: 21px;
	margin: 0;
	padding: 0 8px;
	background-color: var(--color-bg-inset);
	border: 1px solid var(--color-border-input);
	border-radius: 3px;
	font-family: var(--theme-font);
	font-size: 11.5px;
	color: var(--color-text-primary);
}

input.sbox::placeholder {
	color: var(--color-text-dim);
}

input.sbox::-webkit-search-cancel-button,
input.sbox::-webkit-search-decoration {
	-webkit-appearance: none;
}

input.sbox:focus {
	outline: 1px solid var(--color-link-hover);
}

/* ---- Top links: plain text, two lines, centred, separated by a square ---- */
.nav-top {
	margin-top: 14px;
	font-size: 14px;
	line-height: 2.1;
	text-align: center;
}

.nav-sep {
	padding: 0 9px;
	color: var(--color-nav-sep);
}

/* =====================================================
   HEADINGS
   ===================================================== */

.section-title {
	margin: 0 0 6px 0;
	font-size: 19px;
	font-weight: 700;
	color: var(--color-text-primary);
}

/* Page / post title */
.entry-title {
	margin: 0;
	font-size: 26px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--color-text-primary);
}

.entry-title a,
.entry-title a:visited {
	color: var(--color-text-primary);
}

.entry-title a:hover {
	color: var(--color-link-hover);
}

.back-link {
	margin-bottom: 14px;
	font-size: 13px;
}

.entry-meta {
	margin: 8px 0 18px 0;
	font-size: 12.5px;
	color: var(--color-text-meta);
}

.entry-meta a,
.entry-meta a:visited {
	color: var(--color-text-meta);
}

/* category links inside the meta line are accent coloured */
.entry-meta a[rel~="category"],
.entry-meta a[rel~="category"]:visited {
	color: var(--color-link-hover);
}

.entry-meta a:hover {
	color: var(--color-link-hover);
}

/* short link at the end of the meta line: orange chain icon, same height as the text */
.short-icon {
	width: 1em;
	height: 1em;
	margin-right: 4px;
	vertical-align: -0.15em;
	fill: none;
	stroke: var(--color-link-hover);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* =====================================================
   HR DIVIDERS
   ===================================================== */

hr,
.theme-hr {
	border: 0;
	border-top: 1px solid #444444;
	height: 0;
	margin: 12px 0 16px 0;
}

/* =====================================================
   POST LISTING (index / archive / search)
   ===================================================== */

.post-item {
	display: grid;
	grid-template-columns: 125px minmax(0, 1fr);
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--color-border-line);
}

.post-thumb-link {
	display: block;
	line-height: 0;
	margin-top: 6px;  /* nudges the thumbnail down so it sits level with the text */
}

.post-thumb {
	display: block;
	width: 125px;
	height: 75px;
	object-fit: cover;
	border: 1px solid var(--color-border-media);
	border-radius: 4px;
}

.post-info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.post-title,
.post-title:visited {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--color-text-primary);
	text-decoration: none;
}

.post-title:hover {
	color: var(--color-link-hover);
	text-decoration: underline;
}

.post-excerpt p {
	margin: 0;
	font-weight: 300;
	color: #d0d0d0;
}

.post-meta {
	margin-top: 2px;
	font-size: 12px;
	color: var(--color-text-meta);
}

/* category link in the listing meta is accent coloured */
.post-meta a,
.post-meta a:visited {
	color: var(--color-link-hover);
}

.post-meta a:hover {
	text-decoration: underline;
}

/* view count number (front page + single post) */
.views-num {
	color: #ffffff;
}

.no-posts {
	margin: 14px 0 0 0;
	color: var(--color-text-meta);
}

/* =====================================================
   PAGINATION (native paginate_links)
   ===================================================== */

.pagination {
	padding-top: 18px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.pagination-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 2px;
}

.pagination .page-numbers {
	box-sizing: border-box;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: var(--color-text-primary);
	text-decoration: none;
}

.pagination a.page-numbers:hover {
	background-color: #1c1c1c;
	color: var(--color-link-hover);
	text-decoration: none;
}

.pagination .page-numbers.current {
	background-color: var(--color-link-hover);
	color: #111111;
	font-weight: 700;
}

.pagination .page-numbers.dots {
	min-width: 24px;
	padding: 0;
	color: var(--color-nav-sep);
}

.pagination-info {
	font-size: 12px;
	color: var(--color-text-dim);
}

/* =====================================================
   POST / PAGE BODY — built for 640px wide images and videos
   ===================================================== */

.body-text {
	font-family: var(--theme-font);
	font-size: 15px;
	font-weight: 300;
	line-height: 1.7;
	color: var(--color-text-body);
	text-align: justify;
}

.body-text p {
	margin: 0 0 14px 0;
}

.body-text h2,
.body-text h3,
.body-text h4 {
	margin: 22px 0 10px 0;
	line-height: 1.3;
	text-align: left;
	color: var(--color-text-primary);
}

.body-text h2 { font-size: 20px; font-weight: 700; }
.body-text h3 { font-size: 17px; font-weight: 500; }
.body-text h4 { font-size: 15px; font-weight: 500; }

.body-text ul,
.body-text ol {
	margin: 0 0 14px 0;
	padding-left: 24px;
}

.body-text li {
	margin-bottom: 4px;
}

/* Images inside the post (WordPress emoji excluded) */
.body-text img {
	max-width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	border: 1px solid var(--color-border-media);
}

.body-text img.wp-smiley,
.body-text img.emoji {
	border: 0;
	height: 1em;
	width: 1em;
	margin: 0 0.07em;
	vertical-align: -0.1em;
}

.body-text iframe,
.body-text video,
.body-text embed,
.body-text object {
	max-width: 100%;
}

.body-text figure {
	margin: 16px 0;
}

.body-text figcaption,
.body-text .wp-caption-text {
	margin-top: 6px;
	font-size: 12.5px;
	text-align: center;
	color: var(--color-text-meta);
}

.body-text table {
	border-collapse: collapse;
	max-width: 100%;
}

.body-text th,
.body-text td {
	padding: 4px 8px;
}

/* Legacy image classes used inside older posts */
.vborder,
.vborder2 {
	margin: 0;
	padding: 0;
	border: 1px solid var(--color-border-media);
}

/* video inside a vborder box: no gap under the player */
.vborder iframe,
.vborder2 iframe,
.vborder video,
.vborder2 video {
	display: block;
	margin: 0 auto;
	max-width: 100%;
}

.shadowbox {
	-webkit-box-shadow: 2px 6px 20px #000000;
	box-shadow: 2px 6px 20px #000000;
}

.bigtext {
	font-family: var(--theme-font);
	font-size: 26pt;
	font-weight: 700;
}

/* =====================================================
   BLOCKQUOTE — Lora italic with large orange quote mark
   ===================================================== */

.body-text blockquote {
	position: relative;
	margin: 18px 0;
	padding: 6px 0 6px 52px;
	border: 0;
	background: none;
	font-family: var(--theme-font-quote);
	font-size: 16px;
	font-style: italic;
	font-weight: 400;
	text-align: left;
	color: #e4e4e4;
}

.body-text blockquote::before {
	content: '\201C';
	position: absolute;
	left: 6px;
	top: -6px;
	font-family: var(--theme-font-quote);
	font-size: 56px;
	line-height: 1;
	color: var(--color-link-hover);
}

.body-text blockquote p:last-child {
	margin-bottom: 0;
}

.body-text blockquote cite {
	display: block;
	margin-top: 8px;
	font-family: var(--theme-font);
	font-size: 12px;
	font-style: normal;
	color: var(--color-text-meta);
}

/* =====================================================
   CODE — Fira Code
   ===================================================== */

pre,
code {
	font-family: var(--theme-font-code);
}

pre {
	margin: 16px 0;
	padding: 12px 14px;
	background: var(--color-bg-inset);
	border: 1px solid var(--color-border-panel);
	border-radius: 4px;
	overflow-x: auto;
	font-size: 13px;
	line-height: 1.6;
	text-align: left;
	color: #e8e8e8;
}

code {
	padding: 1px 5px;
	background: var(--color-bg-inset);
	border-radius: 3px;
	font-size: 13px;
	color: #e8e8e8;
}

pre code {
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
}

/* =====================================================
   SHARE + COMMENTS (single post)
   ===================================================== */

.share-box {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--color-border-line);
	text-align: center;
}

.comments-box {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--color-border-line);
}

/* =====================================================
   CATEGORIES PAGE TEMPLATE
   ===================================================== */

.cat-block {
	padding: 14px 0 14px 0;
	border-bottom: 1px solid var(--color-border-line);
}

.cat-block:last-of-type {
	border-bottom: 0;
}

.cat-title {
	margin: 0;
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 17px;
	font-weight: 700;
}

.cat-title a,
.cat-title a:visited {
	color: var(--color-link-hover);
}

.cat-title a:hover {
	text-decoration: underline;
}

.cat-count {
	font-size: 12px;
	font-weight: 400;
	color: var(--color-text-dim);
}

.cat-posts {
	list-style: square;
	margin: 8px 0 0 0;
	padding-left: 22px;
	color: var(--color-nav-sep);
}

.cat-posts li {
	padding: 4px 0 8px 0;
	line-height: 1.5;
}

.cat-posts li > a {
	color: var(--color-text-primary);
}

.cat-posts li > a:hover {
	color: var(--color-link-hover);
}

/* italic light-grey summary, ending with [more ...] */
.cat-summary {
	margin-top: 2px;
	font-size: 12.5px;
	font-style: italic;
	font-weight: 300;
	line-height: 1.5;
	color: var(--color-text-meta);
}

.cat-summary a.more,
.cat-summary a.more:visited {
	color: var(--color-text-meta);
	font-style: italic;
	white-space: nowrap;
}

.cat-summary a.more:hover {
	color: var(--color-link-hover);
}

.cat-viewall {
	margin-top: 8px;
	font-size: 13px;
}

.cat-viewall a,
.cat-viewall a:visited {
	color: var(--color-text-meta);
}

.cat-viewall a:hover {
	color: var(--color-link-hover);
}

.cat-empty {
	margin: 8px 0 0 22px;
	font-size: 12px;
	color: var(--color-text-dim);
}

/* =====================================================
   FOOTER
   ===================================================== */

.site-footer {
	padding-top: 18px;
	text-align: center;
	font-size: 12px;
	color: var(--color-text-dim);
}

.site-footer a,
.site-footer a:visited {
	color: var(--color-text-dim);
}

.site-footer a:hover {
	color: var(--color-link-hover);
}

/* =====================================================
   MISC
   ===================================================== */

.comment-moderation {
	color: #e07070;
	font-size: 12px;
}

#popitmenu {
	position: absolute;
	background-color: var(--color-bg-panel);
	border: 1px solid var(--color-border-panel);
	font-family: var(--theme-font);
	font-size: 12px;
	line-height: 20px;
	z-index: 100;
	visibility: hidden;
}

#popitmenu a {
	text-decoration: none;
	padding-left: 8px;
	color: var(--color-text-dim);
	display: block;
}

#popitmenu a:hover {
	background-color: var(--color-border-panel);
	color: var(--color-link-hover);
}

/* =====================================================
   TOOLTIP (qtip.js) — yellow text on dark
   ===================================================== */

div#qTip {
	padding: 4px 8px;
	border: 1px solid #333;
	display: none;
	background: var(--color-bg-panel);
	color: #FFE000;
	font-family: var(--theme-font);
	font-size: 11px;
	text-align: left;
	position: absolute;
	z-index: 1000;
}

/* =====================================================
   SMALL SCREENS
   ===================================================== */

@media (max-width: 560px) {
	.wrap { padding-top: 12px; }
	.profile { padding: 14px 16px; }
	.main-panel { padding-left: 16px; padding-right: 16px; }
	.profile-photo { width: 64px; height: 64px; }
	.profile-name, .profile-name a { font-size: 19px; }
	.entry-title { font-size: 22px; }
	.body-text { text-align: left; }
}

@media (max-width: 460px) {
	.post-item { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
	.post-thumb { width: 96px; height: 58px; }
}
