/*
Theme Name: Heli Salonen
Theme URI: https://helisalonen.fi
Description: Portfolio theme for Heli Salonen, recreating the layout of the original "Filtered" theme.
Author: Heli Salonen
Version: 1.0
Text Domain: helis
*/

/* ---------------------------------------------------------------------
   Reset
--------------------------------------------------------------------- */

* {
	box-sizing: border-box;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, li, figure {
	margin: 0;
	padding: 0;
}

ul {
	list-style: none;
}

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

a {
	text-decoration: none;
	color: #da9753;
}

a:hover {
	color: #cb8139;
}

.clearfix::after {
	content: '';
	display: block;
	clear: both;
}

/* ---------------------------------------------------------------------
   Global
--------------------------------------------------------------------- */

body {
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 16px;
	color: #7d7d7b;
	padding: 1% 0;
	/* subtle grid texture, standing in for the old bkg_grid.jpg */
	background-color: #dadbdb;
	background-image:
		linear-gradient( rgba(255, 255, 255, 0.15) 1px, transparent 1px ),
		linear-gradient( 90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px );
	background-size: 16px 16px;
}

h1, h2, h3, h4, h5, h6 {
	color: #696969;
	font-weight: normal;
}

/* ---------------------------------------------------------------------
   Layout shell
--------------------------------------------------------------------- */

#container {
	max-width: 60em;
	margin: 0 auto;
	background: #fff;
	border: 1px solid #cccdce;
	border-radius: 10px;
	overflow: hidden;
}

#main {
	max-width: 60em;
	margin: 0 auto;
}

/* ---------------------------------------------------------------------
   Header
--------------------------------------------------------------------- */

#header {
	padding: 4.5% 4% 2.5%;
	position: relative;
}

#header .inside {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
}

#logo h1 {
	font-size: 35px;
	font-family: Georgia, "Times New Roman", serif;
}

#logo h1 a,
#logo h1 a:hover {
	color: #575757;
}

#mainNav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 25px;
}

#mainNav a {
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #7d7d7b;
}

#mainNav a:hover {
	color: #595958;
}

#mainNav li.current-menu-item a,
#mainNav li.current_page_item a {
	color: #dc7c00;
}

/* ---------------------------------------------------------------------
   Slideshow (structural bits; see css/slider.css for the component)
--------------------------------------------------------------------- */

.home .slideshow img {
	width: 100%;
}

/* ---------------------------------------------------------------------
   Page head (category / archive titles)
--------------------------------------------------------------------- */

#pageHead {
	border-top: 1px solid #d4d4d4;
	border-bottom: 4px solid #d4d4d4;
	padding: 14px 0 10px;
	margin: 0 3.6% 30px;
}

#pageHead h1 {
	font-size: 1.2em;
	font-family: Georgia, "Times New Roman", serif;
}

/* ---------------------------------------------------------------------
   Page content (CV, Tekniikka, Historia, ...)
--------------------------------------------------------------------- */

.entry-content {
	max-width: 46em; /* comfortable reading measure, not the full column width */
	font-size: 1em;
	line-height: 1.7;
	color: #5c5c5c;
}

.entry-content > * {
	margin: 0 0 22px;
}

.entry-content h2 {
	font-size: 1.4em;
	font-family: Georgia, "Times New Roman", serif;
	margin-top: 20px;
}

.entry-content h3 {
	font-size: 1.15em;
	font-family: Georgia, "Times New Roman", serif;
}

.entry-content h4 {
	font-size: 1em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.entry-content ul,
.entry-content ol {
	padding-left: 22px;
}

.entry-content ul {
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

.entry-content li {
	margin-bottom: 8px;
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.entry-content blockquote {
	margin: 0 0 22px;
	padding-left: 20px;
	border-left: 3px solid #d4d4d4;
	font-style: italic;
	color: #8c8c8c;
}

.entry-content img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 3px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.entry-content .alignleft {
	float: left;
	margin: 0 24px 20px 0;
}

.entry-content .alignright {
	float: right;
	margin: 0 0 20px 24px;
}

.entry-content .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.entry-content .wp-caption-text {
	font-size: 0.8em;
	font-style: italic;
	color: #a0a0a0;
	margin-top: 8px;
}

/* ---------------------------------------------------------------------
   Projects grid — front page + category archives

   Fixed-height image area with object-fit so the whole artwork stays
   visible (never cropped) inside a uniform box. Every tile in a grid
   ends up the same height, so captions always land in the same place
   and can't overlap the row below.
--------------------------------------------------------------------- */

#projects,
#content {
	padding: 0 3.6% 3.6%;
}

.thumbs.masonry {
	display: grid;
	gap: 24px 2%;
	align-items: start;
}

.thumbs.masonry .project.small {
	text-align: center;
}

.thumbs.masonry .thumb {
	width: 100%;
	object-fit: contain;
}

/* Front page: 3 columns, taller boxes */
#projects .thumbs.masonry {
	grid-template-columns: repeat(3, 1fr);
}

#projects .thumbs.masonry .thumb {
	height: 220px;
}

/* Category archives: 4 columns, shorter boxes */
#content .thumbs.masonry {
	grid-template-columns: repeat(4, 1fr);
}

#content .thumbs.masonry .thumb {
	height: 170px;
}

.project.small h1 {
	font-size: 14px;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	padding-top: 10px;
	color: #7d7d7b;
}

.project.small h1 a {
	color: inherit;
}

.project.small:hover h1 a {
	color: #da9753;
}

/* ---------------------------------------------------------------------
   Single project
--------------------------------------------------------------------- */

.project-detail.clearfix {
	display: flex;
	flex-wrap: wrap;
	gap: 4%;
}

.project-detail .left {
	flex: 1 1 64%;
}

.project-detail .right {
	flex: 0 0 30%;
}

.project-detail .left img {
	width: 100%;
}

.skillList {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 20px;
}

.skillList li a {
	display: inline-block;
	background: #bababa;
	color: #fff;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.02em;
	padding: 3px 8px;
	border-radius: 5px;
}

.skillList li a:hover {
	background: #6a6a6a;
	color: #fff;
}

.description {
	font-size: 0.85em;
	color: #7d7d7b;
	padding-bottom: 20px;
	border-bottom: 1px solid #d4d4d4;
}

.projectNav {
	display: flex;
	gap: 10px;
	padding-top: 20px;
}

.projectNav a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #ebebeb;
	color: #999;
}

.projectNav a:hover {
	background: #dcdcdc;
	color: #696969;
}

@media only screen and (max-width: 768px) {
	.project-detail .left,
	.project-detail .right {
		flex: 1 1 100%;
	}
}

/* ---------------------------------------------------------------------
   Footer
--------------------------------------------------------------------- */

#footer {
	background: #f3f3f3;
	border-top: 5px solid #eeeeee;
}

#footer .secondary {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	padding: 3% 4%;
	font-size: 0.8em;
	color: #a2a2a2;
}

#footer a {
	color: #939393;
}

#footer a:hover {
	color: #6d6d6d;
}

/* ---------------------------------------------------------------------
   Responsive
--------------------------------------------------------------------- */

@media only screen and (max-width: 768px) {
	body {
		padding: 0;
	}

	#container {
		border: none;
		border-radius: 0;
	}

	#projects .thumbs.masonry,
	#content .thumbs.masonry {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media only screen and (max-width: 480px) {
	#header .inside {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	#mainNav ul {
		gap: 12px;
	}

	#projects .thumbs.masonry,
	#content .thumbs.masonry {
		grid-template-columns: 1fr;
	}
}
