/* ==========================================================================
   Riccardo Santato — sito personale
   Vanilla CSS, nessuna dipendenza esterna
   ========================================================================== */

:root {
	--sidebar-width: 280px;
	--sidebar-bg: #1a1a1a;
	--sidebar-bg-alt: #222222;
	--sidebar-border: #333333;
	--sidebar-text: #b7b7b7;
	--sidebar-text-dim: #888888;
	--sidebar-text-active: #ffffff;
	--content-bg: #fafafa;
	--content-text: #444444;
	--heading-color: #2c2c2c;
	--accent-blue: #2f66d1;
	--accent-blue-dark: #24509f;
	--max-content-width: 900px;
}

* {
	box-sizing: border-box;
}

html,
body {
	background-color: #FFFFFF;
	margin: 0;
	padding: 0;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--content-text);
	background: var(--content-bg);
	line-height: 1.6;
}

a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(90deg, var(--accent-blue), #7c3aed);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0% 2px;
	transition: background-size 0.25s ease, color 0.2s ease;
}

a:link {
	font-weight: bold;
}

a:hover,
a:focus-visible {
	background-size: 100% 2px;
	color: var(--accent-blue-dark);
}

/* I link della sidebar hanno un proprio stile (.nav-link) e non devono
   ereditare la sottolineatura animata definita sopra per gli altri link. */
.sidebar a {
	background-image: none;
	text-decoration: none;
}

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

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

p {
	text-align: justify;
}
/* ==========================================================================
   Layout shell
   ========================================================================== */

.layout {
	display: flex;
	min-height: 100vh;
}

/* #site-nav is just a mount point filled at runtime by assets/js/main.js
   (fetch of partials/sidebar.html); display:contents keeps it invisible to
   the flex layout so its children behave as direct children of .layout. */
#site-nav {
	display: contents;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
	width: var(--sidebar-width);
	flex: 0 0 var(--sidebar-width);
	background: var(--sidebar-bg);
	color: var(--sidebar-text);
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

.sidebar-brand {
	text-align: center;
	padding: 40px 20px 30px;
}

.sidebar-logo {
	width: 140px;
	margin: 0 auto 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sidebar-logo img {
	max-width: 100%;
	height: auto;
}

.sidebar-name {
	color: #f2f2f2;
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0;
	letter-spacing: 0.02em;
}

.sidebar-nav {
	flex: 1;
	padding-bottom: 30px;
}

.sidebar-nav>ul {
	border-top: 1px solid var(--sidebar-border);
}

.nav-link {
	display: block;
	padding: 14px 30px;
	color: var(--sidebar-text);
	border-bottom: 1px solid var(--sidebar-border);
	font-size: 0.95rem;
	transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
	background: var(--sidebar-bg-alt);
	color: #ffffff;
}

.nav-link.active {
	color: #ffffff;
	font-weight: 700;
	background: var(--sidebar-bg-alt);
}

/* Collapsible groups (My Projects / Social & Links) via <details> — no JS required */

.nav-group {
	border-bottom: 1px solid var(--sidebar-border);
}

.nav-group summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 30px;
	cursor: pointer;
	color: #cfcfcf;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	list-style: none;
}

.nav-group summary::-webkit-details-marker {
	display: none;
}

.nav-group summary .chevron {
	transition: transform 0.15s ease;
	color: #777;
	font-size: 0.7rem;
}

.nav-group[open]>summary .chevron {
	transform: rotate(180deg);
}

.nav-group summary:hover {
	background: var(--sidebar-bg-alt);
	color: #ffffff;
}

.nav-group ul {
	padding-bottom: 4px;
}

.nav-group .nav-link {
	padding-left: 46px;
	border-bottom: none;
	font-size: 0.9rem;
}

.sidebar-footer {
	border-top: 1px solid var(--sidebar-border);
}

/* ==========================================================================
   Mobile menu toggle
   ========================================================================== */

.menu-toggle {
	display: none;
	position: fixed;
	top: 14px;
	left: 14px;
	z-index: 20;
	width: 44px;
	height: 44px;
	background: var(--sidebar-bg);
	border: 1px solid var(--sidebar-border);
	border-radius: 6px;
	color: #fff;
	font-size: 1.3rem;
	cursor: pointer;
}

.sidebar-overlay {
	display: none;
}

/* ==========================================================================
   Main content
   ========================================================================== */

.main-content {
	flex: 1;
	min-width: 0;
	padding: 60px 70px 100px;
}

.hero {
	display: flex;
	align-items: flex-start;
	gap: 50px;
	flex-wrap: wrap;
	margin-bottom: 40px;
}

.hero-photo {
	width: 210px;
	flex: 0 0 210px;
	filter: grayscale(100%);
	border-radius: 4px;
	background: #d9d9d9;
}

.hero-photo.placeholder {
	/*aspect-ratio: 3 / 4;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-size: 0.85rem;
	text-align: center;
	padding: 10px;*/
}

.hero-text h1 {
	margin: 0 0 26px;
	font-size: 2.5rem;
	font-weight: 500;
	line-height: 1.3;
}

.hero-text h1 .highlight {
	background: linear-gradient(100deg, #2f66d1 0%, #7c3aed 50%, #e0409e 100%);
	background-size: 200% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	font-weight: 700;
	padding: 0;
	animation: highlight-sweep 1s ease-out;
}

@keyframes highlight-sweep {
	from {
		background-position: 100% 0;
		opacity: 0;
	}

	to {
		background-position: 0 0;
		opacity: 1;
	}
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
	.hero-text h1 .highlight {
		color: var(--accent-blue-dark);
		-webkit-text-fill-color: currentColor;
	}
}

.hero-text .subtitle {
	color: #6b6b6b;
	font-size: 1.25rem;
	max-width: 640px;
	margin: 0;
}

.section-divider {
	border: none;
	border-top: 1px solid #ddd;
	margin: 30px 0;
}

.section-lead {
	font-size: 1.05rem;
	color: var(--heading-color);
	margin: 0 0 20px;
}

/* Project grid on the homepage */

.project-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(120px, 190px));
	gap: 26px;
}

.project-tile {
	aspect-ratio: 1 / 1;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 14px;
	font-weight: 700;
	font-size: 0.95rem;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-tile:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

/* Per-project color themes (placeholders — replace with real logos/covers) */

/*
.tile-op-eng,
.project-hero-image.tile-op-eng {
	/*background: #0f6b63;
	color: #ffffff;
	 box-shadow: 8px 8px 5px 0px rgba(0,0,0,0.3);
}


.tile-op-ita,
.project-hero-image.tile-op-ita {
	background: #e9f7f5;
	color: #0f6b63;
	border: 2px solid #0f6b63;
	 box-shadow: 8px 8px 5px 0px rgba(0,0,0,0.3);
}


.tile-deepchanger,
.project-hero-image.tile-deepchanger {
	background: #1a1a1a;
	color: #ffffff;
	 box-shadow: 8px 8px 5px 0px rgba(0,0,0,0.3);
}


.tile-storia-video,
.project-hero-image.tile-storia-video {
	background: #7a1f2b;
	color: #f0d78c;
}

.tile-telesuono,
.project-hero-image.tile-telesuono {
	background: #111111;
	color: #ffffff;
}


.tile-storia-mp3,
.project-hero-image.tile-storia-mp3 {
	background: #8a2438;
	color: #f0d78c;
	 box-shadow: 8px 8px 5px 0px rgba(0,0,0,0.3);
}


.tile-grandtour,
.project-hero-image.tile-grandtour {
	background: #e8892e;
	color: #2b1b0e;
}

.tile-bandoneon,
.project-hero-image.tile-bandoneon {
	background: #ffffff;
	color: #b5121b;
	border: 2px solid #b5121b;
}

.tile-fattucchiera,
.project-hero-image.tile-fattucchiera {
	background: #4b2e83;
	color: #f1e6ff;
} */

/* ==========================================================================
   Project / inner page template
   ========================================================================== */

.project-hero {
	display: flex;
	align-items: center;
	gap: 40px;
	flex-wrap: wrap;
	margin-bottom: 40px;
}

.project-hero-image {
	width: 220px;
	flex: 0 0 220px;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 1.6rem;
	text-align: center;
	padding: 10px;
}

.project-title h1 {
	margin: 0 0 10px;
	font-size: 2.3rem;
	font-weight: 500;
	color: var(--heading-color);
}

.project-title h2 {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 400;
	color: #7a7a7a;
}

.project-body {
	max-width: var(--max-content-width);
	font-size: 1.05rem;
}

.project-body p {
	margin: 0 0 20px;
}

.project-body ul {
	margin: 0 0 20px;
	padding-left: 4px;
}

.project-body ul li {
	position: relative;
	padding-left: 22px;
	margin-bottom: 8px;
}

.project-body ul li::before {
	content: "•";
	position: absolute;
	left: 4px;
	color: var(--accent-blue);
	font-weight: 700;
}

.project-body .version-tag {
	display: inline-block;
	margin-top: 10px;
	padding: 6px 14px;
	background: #eef2fb;
	color: var(--accent-blue-dark);
	border-radius: 4px;
	font-size: 0.95rem;
	font-weight: 600;
}

.placeholder-note {
	border: 1px dashed #c9a227;
	background: #fdf6e0;
	color: #7a5c00;
	padding: 14px 18px;
	border-radius: 6px;
	font-size: 0.95rem;
	margin-bottom: 24px;
}

/* Contact page */

.contact-list {
	max-width: 480px;
}

.contact-list li {
	margin-bottom: 14px;
	font-size: 1.05rem;
}

.contact-list a {
	color: var(--accent-blue-dark);
	font-weight: 600;
}

.contact-list a:hover {
	text-decoration: underline;
}

.contact-cta {
	display: inline-block;
	margin-top: 8px;
	padding: 11px 22px;
	background: linear-gradient(90deg, var(--accent-blue), #7c3aed);
	color: #ffffff !important;
	font-weight: 600;
	border-radius: 6px;
	background-size: 100% 100%;
}

.contact-cta:hover {
	color: #ffffff !important;
	opacity: 0.92;
}

/* Contact form */

.contact-form {
	max-width: 560px;
}

.form-row {
	margin-bottom: 20px;
}

.form-row label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: var(--heading-color);
	font-size: 0.95rem;
}

.form-row input,
.form-row textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d5d5d5;
	border-radius: 6px;
	font: inherit;
	color: var(--content-text);
	background: #ffffff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-row input:focus,
.form-row textarea:focus {
	outline: none;
	border-color: var(--accent-blue);
	box-shadow: 0 0 0 3px rgba(47, 102, 209, 0.15);
}

.form-row textarea {
	min-height: 140px;
	resize: vertical;
}

.form-submit {
	padding: 12px 26px;
	border: none;
	border-radius: 6px;
	background: linear-gradient(90deg, var(--accent-blue), #7c3aed);
	color: #ffffff;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.form-submit:hover {
	opacity: 0.9;
}

.form-notice {
	max-width: 560px;
	padding: 14px 18px;
	border-radius: 6px;
	margin-bottom: 24px;
	font-size: 0.95rem;
}

.form-notice.error {
	background: #fdecec;
	color: #a12b2b;
	border: 1px solid #f2b8b8;
}

/* Campo honeypot anti-spam: invisibile per le persone, visibile ai bot
   che compilano automaticamente i campi del form. Nascosto via CSS (non
   display:none) e tenuto fuori dal tab order. */
.hp-field {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
	.menu-toggle {
		display: block;
	}

	.sidebar {
		position: fixed;
		z-index: 30;
		left: 0;
		top: 0;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
		box-shadow: 4px 0 18px rgba(0, 0, 0, 0.35);
	}

	.sidebar.open {
		transform: translateX(0);
	}

	.sidebar-overlay {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.45);
		z-index: 25;
	}

	.sidebar-overlay.visible {
		display: block;
	}

	.layout {
		display: block;
	}

	.main-content {
		padding: 90px 24px 60px;
	}

	.hero,
	.project-hero {
		gap: 26px;
	}

	.hero-photo,
	.project-hero-image {
		width: 150px;
		flex-basis: 150px;
	}

	.hero-text h1 {
		font-size: 1.9rem;
	}

	.project-grid {
		grid-template-columns: repeat(2, minmax(110px, 1fr));
		max-width: 400px;
	}
}

@media (max-width: 420px) {
	.project-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}