/* ============================================================================
 * portfolio.css — showcase pages, styled to match sidrikblal.com exactly.
 *
 * Load order in each index.php:
 *   /css/2021.css            Montserrat + the animated gradient (body.homePage)
 *   /portfolio/portfolio.css this file — every portfolio component
 *
 * 2026.css is deliberately NOT loaded here: it defines .card as a flex column
 * for the homepage grid, which would fight the .card in these pages. The card
 * and chip values below are copied from it instead, so the look matches without
 * the collision. If you restyle cards on the main site, mirror it here.
 *
 * The pages were previously a light document theme (white cards on #f7fafc).
 * They now use the site's dark translucent cards on the gradient. The @media
 * print block at the bottom flips back to light so PDF export still works —
 * a dark background prints terribly.
 * ========================================================================== */

:root {
	--accent: #5bcfba;                        /* the site's mint */
	--primary: #5bcfba;                       /* icons + inline accents on dark */
	--secondary: #ffffff;                     /* headings */
	--text-main: rgba(255, 255, 255, 0.92);
	--text-light: rgba(255, 255, 255, 0.70);
	--bg-card: rgba(8, 34, 44, 0.8);           /* same as the site's .card */
	--card-border: rgba(255, 255, 255, 0.18);
}

body {
	font-family: 'Montserrat', sans-serif;
	margin: 0;
	padding: 0;
	color: var(--text-main);
	line-height: 1.6;
}

/* Language mechanism (unchanged) */
body.fr .lang-en { display: none !important; }
body.en .lang-fr { display: none !important; }

.container {
	width: min(1060px, 90vw);
	margin: 0 auto;
	background: transparent;
	box-shadow: none;
}

/* ---- Header: text straight on the gradient, like the site's hero ---- */
header {
	background: transparent;
	color: #fff;
	padding: 4rem 0 0 0;
	border-bottom: 0;
	position: relative;
}
header h1 {
	margin: 0;
	font-size: clamp(1.9rem, 4.4vw, 2.9rem);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.5pt;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
}
header p {
	margin: 10px 0 0;
	/* Was var(--accent). Mint on the bare gradient measures 1.01-1.84:1 — it is
	   effectively invisible on the teal phase. The mint is a dark-surface accent
	   only; anything sitting straight on the gradient has to be white. */
	font-size: clamp(1.05rem, 2.1vw, 1.3rem);
	color: #fff;
	opacity: 0.88;
	font-weight: 400;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.site-link {
	display: inline-block;
	margin-bottom: 1.6rem;
	color: #fff;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	opacity: 0.9;
	border-bottom: 1px solid rgba(255, 255, 255, 0.45);
	padding-bottom: 1px;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
	transition: opacity 0.18s ease;
}
.site-link:hover, .site-link:focus { opacity: 1; color: #fff; }

.header-meta {
	margin-top: 15px;
	font-size: 0.9rem;
	opacity: 0.85;
	display: flex;
	align-items: center;
	gap: 8px;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}
.header-meta a { color: #fff; }

/* ---- Stat pills: identical to the site's .chip ---- */
.stat-row {
	display: flex;
	gap: 0.5rem;
	margin-top: 1.4rem;
	flex-wrap: wrap;
}
.stat-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(8, 34, 44, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	padding: 0.34rem 0.85rem;
	font-size: 0.83rem;
	font-weight: 500;
	color: #fff;
	white-space: nowrap;
}

/* ---- Language toggle ----------------------------------------------------
   Injected by /js/i18n.js, exactly as on the main site. These rules are copied
   verbatim from 2026.css so the pill is pixel-identical; 2026.css itself is not
   loaded here (it would collide on .card — see the note at the top).
   The old .lang-toggle-btn and its toggleLanguage() are gone. -------------- */
.lang-toggle {
	position: fixed;
	top: 38px;
	right: 28px;
	z-index: 999999;
	display: flex;
	gap: 2px;
	padding: 3px;
	border-radius: 999px;
	background: rgba(8, 34, 44, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.28);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}
.lang-btn {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	background: transparent;
	color: #fff;
	font-family: inherit;
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	padding: 0.34rem 0.7rem;
	border-radius: 999px;
	cursor: pointer;
	line-height: 1;
	opacity: 0.75;
	transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}
.lang-btn:hover { opacity: 1; }
.lang-btn.is-active { background: #ffffff; color: #0f5b52; opacity: 1; }
.lang-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 640px) {
	.lang-toggle { top: 30px; right: 16px; }
	.lang-btn { padding: 0.3rem 0.6rem; font-size: 0.72rem; }
}

.content { padding: 0 0 40px 0; }

/* ---- Section headings: the site's .section-label treatment ---- */
.section { margin-bottom: 3.2rem; }

h2 {
	font-size: 0.78rem;
	letter-spacing: 0.19em;
	text-transform: uppercase;
	font-weight: 600;
	color: #fff;
	opacity: 0.9;
	border-bottom: 1px solid rgba(255, 255, 255, 0.16);
	padding-bottom: 0.7rem;
	margin: 3.2rem 0 1.1rem 0;
	display: flex;
	align-items: center;
	gap: 10px;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}
/* Same reason as header p: these icons sit on the gradient, not on a card. */
h2 i { color: #fff; font-size: 1.1rem; }

h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin-top: 0;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Body copy sits directly on the gradient, which cycles to a very light blue
   (#9bd7e0). Same shadow the main site uses on its .pitch, for the same reason. */
p, li { color: var(--text-main); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45); }

/* Inside a card the backdrop is already dark — no shadow needed. */
.card p, .card li, .impact-box p, .impact-box li, .flow-container p { text-shadow: none; }

.grid { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.main-col { flex: 2; min-width: 300px; }
.side-col { flex: 1; min-width: 250px; }

/* ---- Cards: the site's dark translucent card ---- */
.card {
	background: var(--bg-card);
	border: 1px solid var(--card-border);
	border-radius: 14px;
	padding: 1.5rem;
	margin-bottom: 1.1rem;
	box-shadow: none;
}

.tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(8, 34, 44, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.28);
	color: #fff;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 500;
	margin: 0 5px 10px 0;
}
.tag .ph { font-size: 0.8rem; }

/* ---- Callout: the site's quote-card treatment ---- */
.impact-box {
	background: rgba(8, 34, 44, 0.8);
	border-left: 3px solid var(--accent);
	border-radius: 0 12px 12px 0;
	padding: 1.3rem 1.6rem;
	margin-top: 15px;
}
.impact-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	color: var(--accent);
	margin-bottom: 8px;
}

/* ---- Flow diagram ---- */
.flow-container {
	background: rgba(8, 34, 44, 0.8);
	border: 1px solid var(--card-border);
	border-radius: 14px;
	padding: 30px;
	margin: 20px 0;
}
.flow-step { display: flex; flex-direction: column; align-items: center; position: relative; }
.node {
	background: rgba(8, 34, 44, 0.86);
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: #fff;
	padding: 10px 20px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 0.9rem;
	width: 250px;
	text-align: center;
	box-shadow: none;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.arrow { height: 30px; width: 2px; background: var(--accent); position: relative; }
.arrow::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: -4px;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 8px solid var(--accent);
}

.footer {
	text-align: center;
	padding: 40px 0;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.85);
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.role-list { list-style-type: none; padding-left: 0; margin: 0; }
.role-list li {
	position: relative;
	padding-left: 25px;
	margin-bottom: 12px;
	font-size: 0.9rem;
	color: var(--text-main);
	display: flex;
	align-items: flex-start;
	gap: 8px;
}
.role-list li i { position: absolute; left: 0; top: 2px; color: var(--accent); }

.feature-list { padding-left: 20px; margin-bottom: 0; }
.feature-list li { margin-bottom: 6px; }

/* ---- Carousel ---- */
.carousel-title { margin-top: 40px; font-weight: 700; color: #fff; }
.carousel-container { position: relative; margin: 20px 0 40px 0; }
.carousel-viewport {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	gap: 20px;
	padding-bottom: 15px;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
.carousel-viewport::-webkit-scrollbar { display: none; }

.carousel-item {
	flex: 0 0 300px;
	scroll-snap-align: center;
	background: rgba(8, 34, 44, 0.8);
	border: 1px solid var(--card-border);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
	transition: transform 0.3s ease;
}
.carousel-item:hover { transform: translateY(-5px); }
.carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }

.carousel-caption {
	font-size: 0.85rem;
	/* On the gradient, not on a card — needs the brighter value plus the shadow. */
	color: rgba(255, 255, 255, 0.88);
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
	text-align: center;
	margin-top: 10px;
}

.carousel-btn {
	display: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.28);
	color: #fff;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 1rem;
	font-weight: bold;
	z-index: 10;
	transition: background 0.3s ease, transform 0.2s ease;
	align-items: center;
	justify-content: center;
}
.carousel-btn:hover { background: #fff; color: #0f5b52; }
.carousel-btn:active { transform: translateY(-50%) scale(0.95); }
/* Were at -20px, i.e. hanging outside .carousel-container. 2021.css applies
   `overflow: auto !important` to .container, so those 20px turned into a
   horizontal scrollbar across the whole page (.container measured 1080 wide
   against a 1060 client width). Sitting them just inside removes the overflow
   at its source, and overlapping the edge of the strip is the usual pattern. */
.carousel-btn-left { left: 6px; }
.carousel-btn-right { right: 6px; }

@media (min-width: 768px) {
	.carousel-item { flex: 0 0 32%; }
	.carousel-btn { display: flex; }
}

/* ---- Lightbox ---- */
.lightbox {
	display: none;
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 100%;
	background-color: rgba(8, 34, 44, 0.94);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	z-index: 2000;
	align-items: center;
	justify-content: center;
	cursor: zoom-out;
	padding: 20px;
	box-sizing: border-box;
}
.lightbox img {
	max-width: 85%;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 12px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	cursor: default;
	animation: fadeIn 0.2s ease-out;
	user-select: none;
}
.lightbox-close {
	position: absolute;
	top: 25px; right: 35px;
	color: #fff;
	font-size: 36pt;
	font-weight: 300;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s ease;
	user-select: none;
}
.lightbox-close:hover { color: var(--accent); }

.lightbox-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.28);
	color: #fff;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 1.3rem;
	font-weight: bold;
	z-index: 2010;
	transition: background 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}
.lightbox-btn:hover { background: #fff; color: #0f5b52; }
.lightbox-btn-left { left: 20px; }
.lightbox-btn-right { right: 20px; }

@keyframes fadeIn {
	from { opacity: 0; transform: scale(0.95); }
	to { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {

	header { padding-top: 5.5rem; }
	.card { padding: 1.25rem; }
	.flow-container { padding: 18px; }
	.node { width: 100%; max-width: 250px; }
}

/* ---- Print: flip back to light. A dark page wastes ink and reads badly. ---- */
@media print {
	.carousel-caption, .footer, .carousel-btn, .lang-toggle, .lightbox, .site-link {
		display: none !important;
	}
	body {
		background: #fff !important;
		color: #2d3748 !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
	.container { width: 100%; }
	header h1, header p, h2, h3, p, li, .stat-pill, .node { color: #1a202c !important; text-shadow: none !important; }
	h2 { border-bottom-color: #e2e8f0 !important; }
	.card, .carousel-item, .flow-container, .node {
		background: #fff !important;
		border: 1px solid #e2e8f0 !important;
		box-shadow: none !important;
	}
	.stat-pill, .tag { border-color: #cbd5e0 !important; background: #f7fafc !important; }
	.impact-box { background: #f7fafc !important; border-left-color: #0f5b52 !important; }
	.impact-title, h2 i, .role-list li i { color: #0f5b52 !important; }
	.section { page-break-inside: avoid; }
}

/* ---- Status card --------------------------------------------------------
   Both status boxes carried inline colours left over from the light theme:
   #276749 forest green and #b7791f ochre, which measure 1.51 and 2.79 on the
   dark card — effectively unreadable.

   Live work now uses the site's mint. "Archived" gets a plain white treatment
   rather than an alarm colour: a finished project is a neutral, closed state,
   not a warning, and orange/yellow told the wrong story about it.

   Only the live variant carries an accent stripe. A washed-out white stripe on
   the archived card read as neither accent nor border — just muddy. Keeping the
   card's own uniform 1px edge instead makes the difference deliberate: current
   work is emphasised, finished work is simply stated. ---------------------- */
.status-card {
	margin-bottom: 0;
}
.status-card h3 {
	color: rgba(255, 255, 255, 0.92);
	margin-bottom: 8px;
}
.status-card p {
	font-size: 0.88rem;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: 0;
	font-weight: 400;
}
.status-card--live { border-left: 3px solid var(--accent); }
.status-card--live h3 { color: var(--accent); }
