/* Author: Julia Forsberg (ens21jfg@cs.umu.se) */
/* Date: 2025-11-02 */
/* Aiming Grade: VG */


/* ------------ GENERAL ---------- */

/* Custom Properties */
:root {
	--color-primary: #212551;
	--color-secondary: #2E2825;
	--color-accent: #D9CEF4;
	--color-background: #FAF3E3;
	--color-background-dark: #EAE1CE;
	--color-neutral-000: #FFFFFF;
	--color-neutral-900: #252525;

	--font-family-base: 'Karla', sans-serif;
	--font-family-heading: 'Mulish', sans-serif;

	--padding-x: clamp(1em, 4vw, 8em);
}

/* Reset */
body {
	margin: 0;
	padding: 0;
}

ul {
	list-style-type: none;
	padding: 0;
	margin: 0;
}

a {
	text-decoration: none;
	color: inherit;
}

button {
	background: none;
	border: none;
	color: inherit;
}

/* Globals */
html {
  scroll-behavior: smooth;
}

body {
	background-color: var(--color-background);
	color: var(--color-neutral-900);
	font-family: var(--font-family-base);
	font-size: 1em;
}

body.no-scroll {
	overflow: hidden;
	position: fixed;
	width: 100%;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-family-heading);
	font-weight: 600;
}

main {
	margin: 1em;
}

@media (min-width: 650px) {
	main {
		margin: 1.5em;
	}
}

/* Utilities */
.btn {
	border-radius: 100px;
	padding: 0.5em 1em;
	cursor: pointer;
	transition: filter 0.2s ease-in-out;
	display: inline-block;
}

.btn__icon {
	width: 18px;
	height: 18px;
	vertical-align: middle;
}

.btn:hover {
	filter: brightness(85%);
}

.btn--primary {
	background-color: var(--color-primary);
	color: var(--color-neutral-000);
}

.btn--accent {
	background-color: var(--color-accent);
	color: var(--color-primary);
}

.btn--accent-outlined {
	border: 1px solid var(--color-accent);
	color: var(--color-accent);
}

.badge {
	display: inline-block;
	border: 1px solid var(--color-neutral-900);
	padding: 0.25em 0.75em;
	border-radius: 100px;
	font-size: 0.875em;
}

.badge--primary {
	border: 1px solid var(--color-primary);
	color: var(--color-primary);
}

.badge--accent {
	border: 1px solid var(--color-accent);
	color: var(--color-accent);
}

.main__title {
	font-size: 1.5em;
	margin-top: 1em;
	margin-bottom: 0.75em;
}

@media (min-width: 650px) {
	.main__title {
		font-size: 2em;
	}
}

/* ------------ HEADER + HERO ---------- */

/* Header and Hero */
.header-hero-container {
	height: 250px;
	padding: 1em;
	box-sizing: border-box;
}

@media (min-width: 650px) {
	.header-hero-container {
		height: 350px;
	}
}

@media (min-width: 650px) {
	.header-hero-container {
		padding: 1.5em;
	}
}

.header-hero {
	height: 100%;
	background-color: var(--color-primary);
	color: var(--color-neutral-000);
	background-image: url('./resources/blobs.png');
	background-size: cover;
	border-radius: 20px;
}

/* Header Section */
.header {
	padding: 0 1.5em;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

@media (min-width: 650px) {
	.header {
		padding: 0.5em 2em;
	}
}

.logo {
	width: 140px;
	height: 70px;
	object-fit: contain;
	display: block;
}

@media (min-width: 650px) {
	.logo {
		width: 160px;
	}
}

/* Navigation */
.navigation {
	display: none;
}

@media (min-width: 650px) {
	.navigation {
		display: block;
	}
}

.navigation__list {
	display: flex;
	gap: 1.75em;
	align-items: center;
}

.navigation__list-item {
	position: relative;
	display: inline-block;
	padding-bottom: 6px;
}

.navigation__list-item::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0%;
	height: 1px;
	background-color: var(--color-accent);
	opacity: 0;
	transition: width 0.3s ease, opacity 0.3s ease;
}

.navigation__list-item:hover::after,
.navigation__list-item.active::after {
	width: 100%;
	opacity: 1;
}

/* Hamburger Navigation */
.btn--hamburger {
	padding: 0;
}

.icon-open-menu {
	width: 32px;
	height: 32px;
}

@media (min-width: 650px) {
	.btn--hamburger {
		display: none;
	}
}

.navigation--hamburger {
	position: fixed;
	display: none;
	inset: 0;
	background-color: var(--color-background);
	color: var(--color-primary);
	align-items: center;
	justify-content: center;
	z-index: 10;
}

.navigation--hamburger.active {
	display: flex; 
}

@media (min-width: 650px) {
	.navigation--hamburger {
		display: none;
	}

	.navigation--hamburger.active {
		display: none; 
	}
}

.btn--close {
	position: absolute;
	top: 0.5em;
	right: 0.5em;
	padding: 1em;
	margin: 0.5em 0.75em;
}

.icon-close-menu {
	width: 48px;
	height: 48px;
}

.navigation--hamburger__list {
	display: flex;
	flex-direction: column;
	gap: 2em;
	font-size: 1.25em;
	text-align: center;
}

.navigation--hamburger__list-item.active {
	font-weight: 600;
}

/* Hero Section */
.hero {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0.5em clamp(1.75em, 5vw, 8em);
}

.hero__title {
	font-size: 2em;
}

@media (min-width: 650px) {
	.hero__title {
		font-size: 3em;
	}
}

.hero__subtitle {
	font-size: clamp(1em, 3vw, 1.5em);
	margin-top: 2em;
}

@media (min-width: 650px) {
	.hero__subtitle {
		margin-top: 1em;
	}
}


/* ------------ FOOTER ---------- */

/* Footer */
.footer {
	border-top: 1px solid var(--color-neutral-900);
	margin-top: 10em;
	padding: 1em;
}

@media (min-width: 650px) {
	.footer {
		margin-top: 12em;
		padding: 1.5em;
	}
}

.footer__text {
	margin: 0.5em 0.25em;
	margin-bottom: 1em;
}

@media (min-width: 650px) {
	.footer__text {
		margin: 0.5em var(--padding-x);
		margin-bottom: 1em;
	}
}


/* ------------ HOME PAGE ---------- */

/* Header and Hero */
.header-hero-container--home {
	min-height: 500px;
	height: 100svh;
}

.hero--home {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 4em clamp(1.75em, 5vw, 8em);
	height: 55svh;
	opacity: 0;
	animation: fadeIn 1.2s ease-in-out forwards;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hero__title--home {
	font-size: clamp(1.75em, 6vw, 4em);
}

/* About Section */
.about {
	margin: 2.5em 0.25em;
}

@media (min-width: 650px) {
	.about {
		margin: 4em var(--padding-x);
	}
}

@media (min-width: 800px) {
	.about {
		display: grid;
		gap: 3em;
		grid-template-columns: 3fr 2fr;
	}
}

.about__title {
	color: var(--color-primary);
}

.about__points-container {
	margin: 2em 0;
}

.about__point {
	display: flex;
	align-items: center;
}

.about__point-text {
	color: var(--color-primary);
	margin: 0.5em 0;
	font-weight: 500;
}

.about__point-icon {
	width: 30px;
	height: 30px;
	margin-right: 0.75em;
}

.about__btn {
	margin-top: 2em;
}

.about__btn-first {
	display: none;
}

@media (min-width: 800px) {
	.about__btn-first {
		display: inline-block;
	}
}
@media (min-width: 800px) {
	.about__btn-second {
		display: none;
	}
}

.about__img {
	width: 100%;
	height: auto;
	object-fit: cover;
	align-self: center;
	justify-self: center;
	max-width: 400px;
	border-radius: 20px;
	margin-top: 1em;
}

@media (min-width: 800px) {
	.about__img {
		max-width: 500px;
		margin-top: 0;
	}
}

/* Projects Section */
.projects {
	margin-top: 5em;
	padding: 5em 1.75em;
	background: var(--color-secondary);
	border-radius: 20px;
	color: var(--color-neutral-000);
}

@media (min-width: 650px) {
	.projects {
		margin-top: 7em;
	}
}

@media (min-width: 800px) {
	.projects {
		margin-top: 0;
		padding: 7em var(--padding-x);
	}
}

.projects__title {
	color: var(--color-accent);
}

.projects__cases-container {
	margin-top: 2em;
	display: grid;
	gap: 1em;
}

.projects__case {
	position: relative;
	margin-top: 2em;
	padding: 0 clamp(1em, 6vw, 12em);
	padding-top: 2em;
}

@media (min-width: 650px) {
	.projects__case {
		display: grid;
		gap: 1em;
		grid-template-columns: 3fr 2fr;
		align-items: center;
	}
}

.projects__case-title {
	color: var(--color-accent);
	font-style: italic;
	font-size: 1.25em;
}

.projects__case-description {
	max-width: 400px;
}

.projects__case-btn {
	margin-top: 1em;
	margin-bottom: 2em;
}

.projects__case-img {
	display: block;
	width: 100%;
	max-width: 300px;
	height: auto;
	margin: 1em auto 0;
	border-radius: 6px 6px 0 0;
	object-fit: cover;
	box-shadow: 8px 8px 8px rgba(0, 0, 0, 0.1);
}

@media (min-width: 650px) {
	.projects__case-img {
		max-width: 350px;
	}
}

.projects__case::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--color-neutral-000);
	opacity: 0.1;
	border-radius: 14px;
	z-index: 0;
}

.projects__case > * {
	position: relative;
	z-index: 1;
}

.projects-btn {
	margin-top: 3em;
}

/* Contact Section */
.contact {
	margin: 5em 0.25em;
}

@media (min-width: 650px) {
	.contact {
		margin: 7em var(--padding-x);
	}
}

.contact__title {
	color: var(--color-primary);
}

.contact__list {
	margin-top: 3em;
	display: flex;
	flex-direction: column;
	gap: 1em;
}

@media (min-width: 800px) {
	.contact__list {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 4em;
	}
}

.contact__list-item {
	display: flex;
	align-items: center;
	gap: 0.75em;
	font-size: 1.125em;
	color: var(--color-primary);
	text-decoration: underline;
}

.contact__list-item-icon {
	width: 25px;
	height: 25px;
}


/* ------------ ABOUT PAGE ---------- */

/* About Me Section */
.about-me {
	margin: 2.5em 0.25em;
}

@media (min-width: 650px) {
	.about-me {
		margin: 4em var(--padding-x);
	}
}

/* Technical Skills Section */
.technical-skills {
	margin: 2.5em 0.25em;
}

@media (min-width: 650px) {
	.technical-skills {
		margin: 4em var(--padding-x);
	}
}

.technical-skills__title {
	font-weight: 600;
}


/* ------------ PROJECTS PAGE ---------- */

/* All Projects Section */
.all-projects {
	margin: 2.5em 0.25em;
}

@media (min-width: 650px) {
	.all-projects {
		margin: 4em var(--padding-x);
	}
}

.all-projects__cases-container {
	margin-top: 3em;
	display: grid;
	gap: 2em;
}

@media (min-width: 650px) {
	.all-projects__cases-container {
		margin-top: 4em;
	}
}

.all-projects__title {
	color: var(--color-primary);
}

.all-projects__case {
	background: var(--color-background-dark);
	border-radius: 15px;
	padding: 0 clamp(1em, 6vw, 12em);
	padding-top: 2em;
}

@media (min-width: 800px) {
	.all-projects__case {
		display: grid;
		gap: 4em;
		grid-template-columns: 3fr 2fr;
		align-items: center;
	}
}

.all-projects__case-title {
	color: var(--color-primary);
	font-size: 1.25em;
}

@media (min-width: 650px) {
	.all-projects__case-title {
		font-size: 1.5em;
	}
}

.all-projects__case-tech-stack {
	color: var(--color-primary);
	font-weight: 500;
}

.all-projects__case-description {
	margin-top: 1em;
	padding-bottom: 2em;
}

@media (min-width: 800px) {
	.all-projects__case-description {
		padding-bottom: 3em;
	}
}

.all-projects__case-img {
	display: block;
	width: 100%;
	max-width: 300px;
	height: auto;
	border-radius: 6px 6px 0 0;
	object-fit: cover;
}

@media (min-width: 800px) {
	.all-projects__case-img {
		margin-top: 2em;
	}
}
