/*
	Portfolio Website Styles
	Clean, organized CSS for Henrik Haa's portfolio website
*/

/* ===== RESET & BASE STYLES ===== */
/* Reset default browser styles */
html, body, div, span, applet, object,
iframe, h1, h2, h3, h4, h5, h6, p, blockquote,
pre, a, abbr, acronym, address, big, cite,
code, del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, b,
u, i, center, dl, dt, dd, ol, ul, li, fieldset,
form, label, legend, table, caption, tbody,
tfoot, thead, tr, th, td, article, aside,
canvas, details, embed, figure, figcaption,
footer, header, hgroup, nav, output, ruby,
section, summary, time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

/* Set display properties for semantic elements */
article, aside, details, figcaption, figure,
footer, header, hgroup, nav, section {
	display: block;
}

/* Basic body styles */
body {
	line-height: 1;
	-webkit-text-size-adjust: none;
	-ms-overflow-style: scrollbar;
	background: #fffffe;
}

/* Box sizing */
html {
	box-sizing: border-box;
}

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

/* ===== TYPOGRAPHY ===== */
/* Base font styles */
body, input, select, textarea {
	color: #444444;
	font-family: "Lexend", sans-serif;
	font-size: 12pt;
	font-weight: 300;
	line-height: 1.75;
}

/* Link styles */
a {
	transition: border-bottom-color 0.2s ease, color 0.2s ease;
	text-decoration: none;
	color: #444444;
}

a:hover {
	border-bottom-color: transparent;
	color: #aca3f6 !important;
}

/* Text formatting */
strong, b {
	font-weight: 900;
}

em, i {
	font-style: italic;
}

p {
	margin: 0 0 2em;
}

/* Heading styles */
h1 {
	font-size: 2em;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 1em 0;
	letter-spacing: -0.035em;
}

h1 a {
	color: inherit;
}

h2, h3, h4, h5, h6 {
	font-weight: 900;
	font-family: "Lexend", sans-serif;
	line-height: 1.5;
	margin: 0 0 2em 0;
}

h2 a, h3 a, h4 a, h5 a, h6 a {
	color: inherit;
}

h2 {
	font-size: 1.3em;
}

h3 {
	font-size: 1.1em;
}

h4 {
	font-size: 0.9em;
}

h5, h6 {
	font-size: 0.8em;
}

/* ===== LAYOUT & GRID ===== */
/* Row system for flexible layouts */
.row {
	display: flex;
	flex-wrap: wrap;
	box-sizing: border-box;
	align-items: stretch;
	margin-top: 0;
	margin-left: -2em;
}

.row > * {
	box-sizing: border-box;
	padding: 0 0 0 2em;
}

/* Row alignment options */
.row.aln-left {
	justify-content: flex-start;
}

.row.aln-center {
	justify-content: center;
}

.row.aln-right {
	justify-content: flex-end;
}

.row.aln-top {
	align-items: flex-start;
}

.row.aln-middle {
	align-items: center;
}

.row.aln-bottom {
	align-items: flex-end;
}

/* Column widths */
.row > .col-6 {
	width: 50%;
}

.row > .col-12 {
	width: 100%;
}

/* ===== FORM STYLES ===== */
/* Form container */
form {
	margin: 0 0 2em 0;
	overflow-x: hidden;
}

form > .fields {
	display: flex;
	flex-wrap: wrap;
	width: calc(100% + 3em);
	margin: -1.5em 0 2em -1.5em;
}

form > .fields > .field {
	flex-grow: 0;
	flex-shrink: 0;
	padding: 1.5em 0 0 1.5em;
	width: calc(100% - 1.5em);
}

form > .fields > .field.half {
	width: calc(50% - 0.75em);
}

/* Form labels */
label {
	display: block;
	font-size: 0.9em;
	font-weight: 900;
	margin: 0 0 1em 0;
}

/* Form inputs */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
select,
textarea {
	appearance: none;
	background-color: transparent;
	border: none;
	border-radius: 0;
	border-bottom: solid 1px #444444;
	color: inherit;
	display: block;
	outline: 0;
	padding: 0;
	text-decoration: none;
	width: 100%;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
	border-bottom-color: #aca3f6;
	box-shadow: inset 0 -1px 0 0 #aca3f6;
}

/* Input heights */
input[type="text"],
input[type="password"],
input[type="email"],
select {
	height: 3em;
}

textarea {
	padding: 0;
	min-height: 3.75em;
}

/* ===== BUTTON STYLES ===== */
/* Base button styles */
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
	font-family: "Lexend", sans-serif;
	appearance: none;
	transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
	background-color: transparent;
	border-radius: 4px;
	border: 0;
	color: #3da9fc !important;
	cursor: pointer;
	display: inline-block;
	font-size: 0.8em;
	font-weight: 900;
	height: 3.5em;
	letter-spacing: 0.35em;
	line-height: 3.45em;
	overflow: hidden;
	padding: 0 1.25em 0 1.6em;
	text-align: center;
	text-decoration: none;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Button hover states */
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover,
.button:hover {
	color: #aca3f6 !important;
	box-shadow: inset 0 0 0 2px #aca3f6;
}

/* Primary button variant */
input[type="submit"].primary,
input[type="reset"].primary,
input[type="button"].primary,
button.primary,
.button.primary {
	box-shadow: none;
	background-color: #aca3f6;
	color: #fffffe !important;
}

input[type="submit"].primary:hover,
input[type="reset"].primary:hover,
input[type="button"].primary:hover,
button.primary:hover,
.button.primary:hover {
	background-color: #514a8c;
}

/* ===== HEADER & NAVIGATION ===== */
/* Header container */
#header {
	padding: 0.5em 0;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

#header .inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0;
}

/* Logo styling */
#header .logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	border-bottom: 0;
	margin: 0;
	padding: 0;
	text-align: left;
}

#header .logo > * {
	display: inline-block;
	vertical-align: middle;
}

#header .logo .symbol img {
	display: inline-block;
	width: auto;
	height: 5em;
	margin: 0;
}

.logo h1 {
	font-size: 1.25rem;
	font-weight: 600;
	color: #2c3e50;
	margin: 0;
}

/* Navigation */
#header nav {
	position: relative;
	right: auto;
	top: auto;
	z-index: 10000;
}

nav {
	display: flex;
	align-items: center;
}

nav ul {
	display: flex;
	gap: 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

nav a {
	position: relative;
	color: #2c3e50;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s ease;
	padding: 0.5rem 0;
}

nav a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, #667eea, #764ba2);
	transition: width 0.3s ease;
}

nav a:hover::after {
	width: 100%;
}

nav a:hover {
	color: #667eea;
}

/* ===== MAIN CONTENT ===== */
/* Main container */
#main {
	padding: 0em 0 6em 0;
}

/* Wrapper for content */
#wrapper > * > .inner {
	width: 100%;
	max-width: 68em;
	margin: 0 auto;
	padding: 0 2.5em;
}

/* ===== HERO SECTION ===== */
.hero-section {
	text-align: center;
	padding: 4rem 0;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	margin-bottom: 3rem;
	margin-top: 2rem;
	border-radius: 16px;
}

.hero-content h1 {
	font-size: 3rem;
	font-weight: 700;
	margin-bottom: 1rem;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
	font-size: 1.5rem;
	font-weight: 500;
	margin: 1em 2em 1.5rem 1em;
	opacity: 0.9;
}

.hero-description {
	font-size: 1.1rem;
	max-width: 800px;
	margin: 1em 2em 2rem 1em;
	line-height: 1.6;
	opacity: 0.95;
}

.hero-actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

.hero-actions .button {
	padding: 0.75rem 2rem;
	font-size: 1.1rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 50px;
	transition: all 0.3s ease;
}

.hero-actions .button.primary {
	background: #ffffff;
	color: #667eea !important;
	border: 2px solid #ffffff;
}

.hero-actions .button.primary:hover {
	background: transparent;
	color: #ffffff !important;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.hero-actions .button.secondary {
	background: transparent;
	color: #ffffff !important;
	border: 2px solid #ffffff;
}

.hero-actions .button.secondary:hover {
	background: #ffffff;
	color: #667eea !important;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* ===== SECTION STYLING ===== */
.section {
	margin-bottom: 4rem;
	padding: 2rem 0;
}

.section-header {
	text-align: center;
	margin-bottom: 3rem;
}

.section-header h2 {
	font-size: 2.5rem;
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 1rem;
	position: relative;
}

.section-header h2::after {
	content: '';
	position: absolute;
	bottom: -10px;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 4px;
	background: linear-gradient(90deg, #667eea, #764ba2);
	border-radius: 2px;
}

/* ===== ABOUT SECTION ===== */
.about-content {
	max-width: 800px;
	margin: 0 auto;
}

.about-text p {
	font-size: 1.1rem;
	line-height: 1.8;
	margin-bottom: 1.5rem;
	color: #555;
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
	margin-top: 2rem;
}

.skill-category {
	background: #f8f9fa;
	padding: 2rem;
	border-radius: 12px;
	border: 1px solid #e9ecef;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.skill-category:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 30px rgba(0,0,0,0.1);
	border-color: #667eea;
}

.skill-category::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
	transition: left 0.5s ease;
}

.skill-category:hover::before {
	left: 100%;
}

.skill-category h3 {
	font-size: 1.3rem;
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 1rem;
	text-align: center;
}

.skill-list {
	list-style: none;
	padding: 0;
}

.skill-list li {
	padding: 0.5rem 0;
	color: #555;
	position: relative;
	padding-left: 1.5rem;
}

.skill-list li::before {
	content: '▸';
	position: absolute;
	left: 0;
	color: #667eea;
	font-weight: bold;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-intro {
	text-align: center;
	max-width: 800px;
	margin: 0 auto 3rem;
}

.portfolio-intro p {
	font-size: 1.1rem;
	line-height: 1.6;
	color: #555;
}

.portfolio-item {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 5px 20px rgba(0,0,0,0.1);
	transition: all 0.3s ease;
	border: 1px solid #e9ecef;
	position: relative;
}

.portfolio-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.portfolio-item::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 1;
}

.portfolio-item:hover::before {
	opacity: 1;
}

.portfolio-content {
	padding: 1.5rem;
	position: relative;
	z-index: 2;
}

.portfolio-content h3 {
	font-size: 1.4rem;
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 1rem;
}

.portfolio-content .content p {
	color: #555;
	line-height: 1.6;
	margin-bottom: 1rem;
}

.portfolio-details {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}

.tech-tag {
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: white;
	padding: 0.3rem 0.8rem;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 500;
}

.placeholder-image {
	width: 100%;
	height: 200px;
	background: linear-gradient(135deg, #f8f9fa, #e9ecef);
	display: flex;
	align-items: center;
	justify-content: center;
	border-bottom: 1px solid #e9ecef;
}

.placeholder-image .icon {
	font-size: 3rem;
	opacity: 0.6;
}

/* ===== PROJECT TILES ===== */
.tiles {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem;
	margin: 2rem 0;
}

.tiles article {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 5px 20px rgba(0,0,0,0.1);
	transition: all 0.3s ease;
	border: 1px solid #e9ecef;
}

.tiles article:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.tiles article > .image {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border-radius: 4px 4px 0 0;
	overflow: hidden;
}

.tiles article > .image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tiles article > a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transition: background-color 0.5s ease, transform 0.5s ease;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding: 1em;
	border-radius: 4px 4px 0 0;
	border-bottom: 0;
	color: #fffffe;
	text-align: center;
	text-decoration: none;
	z-index: 3;
}

.tiles article > a > :last-child {
	margin: 0;
}

.tiles article > a:hover {
	color: #fffffe !important;
}

.tiles article > a h2 {
	margin: 0;
}

.tiles article > a .content {
	transition: max-height 0.5s ease, opacity 0.5s ease;
	width: 100%;
	max-height: 0;
	line-height: 1.5;
	margin-top: 0.35em;
	opacity: 0;
}

.tiles article > a .content > :last-child {
	margin-bottom: 0;
}

body:not(.is-touch) .tiles article:hover .content {
	max-height: 15em;
	opacity: 1;
}

* + .tiles {
	margin-top: 2em;
}

body.is-touch .tiles article .content {
	max-height: 15em;
	opacity: 1;
}

/* Responsive tiles */
@media screen and (max-width: 768px) {
	.tiles {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

/* ===== EXPERIENCE SECTION ===== */
.experience-content {
	max-width: 900px;
	margin: 0 auto;
}

.experience-item {
	margin-bottom: 2rem;
	padding: 1.5rem;
	background: #f8f9fa;
	border-radius: 8px;
	border-left: 4px solid #667eea;
}

.experience-item h3 {
	font-size: 1.3rem;
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 1rem;
}

.experience-item p {
	color: #555;
	line-height: 1.6;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
	background: #f8f9fa;
	padding: 3.5rem 2rem;
	border-radius: 12px;
	margin-bottom: 2rem;
}

.contact-content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
}

.contact-info p {
	font-size: 1.1rem;
	line-height: 1.6;
	color: #555;
	margin-bottom: 2rem;
}

.contact-methods {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.contact-method {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: #555;
}

.contact-method .icon {
	font-size: 1.2rem;
}

.contact-form {
	background: white;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 5px 20px rgba(0,0,0,0.1);
	position: relative;
}

.contact-form::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #667eea, #764ba2);
	border-radius: 8px 8px 0 0;
}

.contact-form .field {
	margin-bottom: 1.5rem;
}

.contact-form .field.half {
	width: calc(50% - 0.5rem);
	display: inline-block;
}

.contact-form .field.half:first-child {
	margin-right: 1rem;
}

.contact-form label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: #2c3e50;
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	padding: 0.75rem;
	border: 2px solid #e9ecef;
	border-radius: 6px;
	font-size: 1rem;
	transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
	outline: none;
	border-color: #667eea;
}

.contact-form .actions {
	display: flex;
	gap: 1rem;
	margin-top: 2rem;
}

/* ===== ENHANCED BUTTON STYLES ===== */
.button {
	display: flex;
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	text-align: center;
	align-items: center;   /* Vertical center */
  	justify-content: center;
}

.button.primary {
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: white;
}

.button.primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.button.secondary {
	background: white;
}

.button.secondary:hover {
	transform: translateY(-2px);
}

/* ===== FORM STATUS & VALIDATION ===== */
.form-status {
	margin-top: 1rem;
	padding: 1rem;
	border-radius: 6px;
	display: none;
}

.form-status.success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
	display: block;
}

.form-status.error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
	display: block;
}

.form-status.info {
	background: #d1ecf1;
	color: #0c5460;
	border: 1px solid #bee5eb;
	display: block;
	animation: pulse 2s infinite;
}

.field-error {
	color: #dc3545;
	font-size: 0.875rem;
	margin-top: 0.25rem;
	display: block;
}

/* ===== FOOTER ===== */
#footer {
	padding: 4em 0 5em 0;
	background-color: #ebebeb;
}

#footer > .inner {
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
}

#footer > .inner > * > :last-child {
	margin-bottom: 0;
}

#footer > .inner .copyright {
	width: 100%;
	padding: 0;
	margin-top: 5em;
	list-style: none;
	font-size: 0.8em;
	color: #444444;
}

#footer > .inner .copyright a {
	color: inherit;
}

#footer > .inner .copyright li {
	display: inline-block;
	border-left: solid 1px #444444;
	line-height: 1;
	padding: 0 0 0 1em;
	margin: 0 0 0 1em;
}

#footer > .inner .copyright li:first-child {
	border-left: 0;
	padding-left: 0;
	margin-left: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
	0% { opacity: 1; }
	50% { opacity: 0.5; }
	100% { opacity: 1; }
}

/* ===== MOBILE HEADER/NAV LAYOUT ===== */
@media screen and (max-width: 600px) {
	#header .inner {
		flex-direction: column;
		align-items: center;
		gap: 0.5rem;
	}
	#header .logo {
		justify-content: center;
		width: 100%;
		text-align: center;
	}
	#header .logo .symbol img {
		display: block;
		margin: 0 auto;
		height: 4em;
	}
	#header nav {
		display: none;
	}
}