/* ==========================================================================
   Jakadeva Design — jakadeva.net
   Foglio di stile del sito, indipendente dal vecchio template HTML5 UP.
   ========================================================================== */

:root {
	--bg: #10131a;
	--bg-elev: #171b25;
	--bg-elev-2: #1e2330;
	--border: rgba(255, 255, 255, 0.09);
	--text: #eef0f6;
	--text-dim: #9aa3b8;
	--accent: #ff8a4c;
	--accent-2: #4c7dff;
	--radius: 14px;
	--max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 700; }

.sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute; left: -999px; top: 0; z-index: 100;
	background: var(--accent); color: #10131a; padding: 0.75em 1.25em;
	border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

.site-header {
	position: sticky; top: 0; z-index: 40;
	background: rgba(16, 19, 26, 0.85);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}

.site-header__inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0.9em 1.25em;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
}

.brand {
	color: var(--text);
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}
.brand strong { color: var(--accent); }
.brand:hover { text-decoration: none; opacity: 0.85; }

.site-nav {
	display: flex;
	gap: 1.75em;
}
.site-nav a {
	color: var(--text-dim);
	font-weight: 600;
	font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: none;
	border: 1px solid var(--border);
	border-radius: 8px;
	cursor: pointer;
}
.nav-toggle span {
	display: block;
	width: 18px;
	height: 2px;
	margin: 0 auto;
	background: var(--text);
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero ----------------------------------------------------------------- */

.hero {
	padding: 5em 1.25em 4em;
	background:
		linear-gradient(135deg, rgba(16, 19, 26, 0.82) 0%, rgba(16, 19, 26, 0.78) 35%, rgba(16, 19, 26, 0.5) 100%),
		url('../images/hero-bg.jpg') center / cover no-repeat;
	border-bottom: 1px solid var(--border);
}
.hero__inner { max-width: var(--max-width); margin: 0 auto; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.hero p { color: var(--text-dim); max-width: 46em; font-size: 1.08rem; }

.button {
	display: inline-block;
	margin-top: 0.75em;
	padding: 0.7em 1.4em;
	border-radius: 999px;
	background: var(--accent);
	color: #171208;
	font-weight: 700;
}
.button:hover { text-decoration: none; opacity: 0.9; }

/* Sections --------------------------------------------------------------- */

main > section {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 4em 1.25em;
}

.section-title {
	font-size: 1.6rem;
	margin-bottom: 1.25em;
}

/* Cards -------------------------------------------------------------- */

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5em;
}

.card {
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-elev-2); position: relative; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }

.card__media--frame iframe {
	width: 100%; height: 100%; border: 0; display: block; background: #000;
}

.card__expand {
	position: absolute;
	top: 0.6em;
	right: 0.6em;
	width: 2.2em;
	height: 2.2em;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(16, 19, 26, 0.78);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 8px;
	cursor: pointer;
	backdrop-filter: blur(4px);
}
.card__expand:hover { background: var(--accent); color: #171208; border-color: var(--accent); }

.link-button {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	color: var(--accent);
	cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

.card__media--icon {
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 21 / 9;
	font-size: 3rem;
	color: var(--accent);
	background: linear-gradient(135deg, rgba(255,138,76,0.12), rgba(76,125,255,0.12));
}

.card__body { padding: 1.4em; display: flex; flex-direction: column; gap: 0.6em; flex: 1 1 auto; }
.card__body h3 { font-size: 1.15rem; display: flex; align-items: center; gap: 0.5em; flex-wrap: wrap; }
.card__body p { color: var(--text-dim); margin: 0; }

.card--highlight { border-color: rgba(255, 138, 76, 0.35); }

.card__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin-top: auto;
	padding-top: 0.4em;
	font-weight: 600;
	font-size: 0.92rem;
}
.card__link i { font-size: 0.85em; transition: transform 0.15s ease; }
.card__link:hover { text-decoration: none; }
.card__link:hover i { transform: translateX(3px); }

/* Nascosti finche' le pagine dedicate di ciascuna card non sono pronte.
   Per riattivarli tutti insieme, basta togliere questa regola. */
.card__link { display: none; }

.badge {
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #171208;
	background: var(--accent);
	padding: 0.2em 0.55em;
	border-radius: 999px;
}

.mini-list { margin: 0; padding-left: 1.1em; color: var(--text-dim); }
.mini-list li + li { margin-top: 0.4em; }

.fine-print { font-size: 0.82rem; color: var(--text-dim); }

/* Timeline ------------------------------------------------------------- */

.timeline-section { border-top: 1px solid var(--border); }

.timeline {
	list-style: none;
	margin: 0 0 2.5em;
	padding: 0;
	border-left: 2px solid var(--border);
}

.timeline li {
	position: relative;
	padding: 0 0 1.4em 1.5em;
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em 0.9em;
}

.timeline li::before {
	content: "";
	position: absolute;
	left: -6.5px;
	top: 0.35em;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--accent-2);
	border: 2px solid var(--bg);
}

.timeline__year {
	font-weight: 700;
	color: var(--accent);
	min-width: 3.4em;
}

.timeline__text { color: var(--text-dim); }

.skills {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5em;
}

.skills__group h3 { font-size: 1rem; color: var(--text-dim); font-weight: 600; margin-bottom: 0.6em; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5em; }
.tags li {
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 0.35em 0.85em;
	font-size: 0.85rem;
	color: var(--text);
}

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

.site-footer {
	border-top: 1px solid var(--border);
	background: var(--bg-elev);
}
.site-footer__inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 3em 1.25em;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 2em;
}
.site-footer h2 { font-size: 1.05rem; }
.site-footer .copyright { margin: 0 0 0.5em; }
.site-footer .fine-print { color: var(--text-dim); font-size: 0.85rem; max-width: 32em; }
.contact p { display: flex; align-items: center; gap: 0.5em; color: var(--text-dim); }
.contact a { color: var(--text); font-weight: 600; }

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

@media (max-width: 760px) {
	.nav-toggle { display: flex; }
	.site-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		gap: 0;
		background: var(--bg-elev);
		border-bottom: 1px solid var(--border);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.25s ease;
	}
	.site-nav.is-open { max-height: 240px; }
	.site-nav a { padding: 0.9em 1.25em; border-top: 1px solid var(--border); }
	.site-header__inner { position: relative; }
}

/* Modale "ingrandisci" ------------------------------------------------- */

.modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3vh 3vw;
}
.modal[hidden] { display: none; }

.modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 8, 12, 0.85);
	backdrop-filter: blur(2px);
}

.modal__panel {
	position: relative;
	width: min(1200px, 100%);
	height: 100%;
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal__frame {
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
	display: block;
}

.modal__close {
	position: absolute;
	top: 0.75em;
	right: 0.75em;
	z-index: 2;
	width: 2.4em;
	height: 2.4em;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(16, 19, 26, 0.85);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 8px;
	cursor: pointer;
	font-size: 1.1rem;
}
.modal__close:hover { background: var(--accent); color: #171208; border-color: var(--accent); }

body.modal-open { overflow: hidden; }

@media (max-width: 600px) {
	.modal { padding: 1.5vh 2vw; }
}

/* Pagina "Collabora" (aziende/investitori) ------------------------------ */

.back-link { display: inline-block; margin-bottom: 1.5em; color: var(--text-dim); }
.back-link:hover { color: var(--text); }

.lang-switch {
	display: flex;
	gap: 0.4em;
	list-style: none;
	margin: 0;
	padding: 0;
}
.lang-switch a,
.lang-switch span {
	display: inline-block;
	padding: 0.3em 0.7em;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 700;
}
.lang-switch a { color: var(--text-dim); border: 1px solid var(--border); }
.lang-switch a:hover { color: var(--text); text-decoration: none; border-color: var(--text-dim); }
.lang-switch span[aria-current="page"] { color: #171208; background: var(--accent); }

/* CTA visibile sulle card di questa pagina (indipendente da .card__link,
   che sul resto del sito e' nascosto finche' le pagine dedicate non sono pronte). */
.card__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin-top: auto;
	padding-top: 0.4em;
	font-weight: 600;
	font-size: 0.92rem;
}
.card__cta i { font-size: 0.85em; transition: transform 0.15s ease; }
.card__cta:hover { text-decoration: none; }
.card__cta:hover i { transform: translateX(3px); }

.callout {
	background: var(--bg-elev);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent-2);
	border-radius: var(--radius);
	padding: 1.4em 1.6em;
}
.callout p { color: var(--text-dim); margin: 0; }
.callout p + p { margin-top: 0.8em; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
