/*
Theme Name:  LigayaAI
Theme URI:   https://ligayacollado.com
Author:      Ligaya Collado
Author URI:  https://ligayacollado.com
Description: Cinematic personal portfolio theme for Ligaya Collado. Black / red / grey palette, Three.js hero, GSAP scroll-triggered timeline, 3D project gallery, certificate lightbox, native blog and secure contact form. Built for standard PHP hosting (Hostinger shared/cloud).
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ligayaai
Tags:        portfolio, one-column, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* =====================================================================
   1. DESIGN TOKENS  (edit these to rebrand — see HostingerImplementation.md)
   The entire palette is limited to red, black, white and grey.
   --accent is the ONLY saturated colour. Swap it once, rebrand everywhere.
   ===================================================================== */
:root {
	--accent:        #e6192e; /* THE red. CTAs, hovers, highlight lines.   */
	--accent-strong: #ff2740; /* brighter red for glows / hover states     */
	--accent-dim:    rgba(230, 25, 46, 0.14);

	--font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
	--font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	--header-h: 72px;
	--radius: 14px;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark (default) — black-dominant */
:root,
:root[data-theme="dark"] {
	--bg:        #0a0a0c;  /* near-black stage                */
	--bg-alt:    #101014;  /* charcoal alternating sections    */
	--surface:   #17171c;  /* cards                            */
	--surface-2: #1e1e24;  /* raised cards / inputs            */
	--text:      #f4f4f5;  /* white text                       */
	--muted:     #9b9ba4;  /* grey text                        */
	--line:      #26262d;  /* hairlines / borders              */
	--scrim:     rgba(6, 6, 8, 0.82);
	--glow:      rgba(230, 25, 46, 0.28);
	--hero-fallback: radial-gradient(1200px 700px at 70% 20%, rgba(230,25,46,.16), transparent 60%),
	                 radial-gradient(900px 600px at 20% 80%, rgba(155,155,164,.10), transparent 55%),
	                 #0a0a0c;
	color-scheme: dark;
}

/* Light — white-dominant version of the same palette */
:root[data-theme="light"] {
	--bg:        #f5f5f6;
	--bg-alt:    #ececee;
	--surface:   #ffffff;
	--surface-2: #f0f0f2;
	--text:      #131316;
	--muted:     #5d5d66;
	--line:      #d9d9de;
	--scrim:     rgba(245, 245, 246, 0.88);
	--glow:      rgba(230, 25, 46, 0.18);
	--hero-fallback: radial-gradient(1200px 700px at 70% 20%, rgba(230,25,46,.10), transparent 60%),
	                 radial-gradient(900px 600px at 20% 80%, rgba(93,93,102,.08), transparent 55%),
	                 #f5f5f6;
	color-scheme: light;
}

/* =====================================================================
   2. RESET / BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 12px);
	-webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.7;
	transition: background-color .5s var(--ease), color .5s var(--ease);
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p a, .entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
p a:hover, .entry-content a:hover { color: var(--accent-strong); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 0 0 0.6em;
	font-weight: 700;
}

::selection { background: var(--accent); color: #fff; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	clip-path: inset(50%);
	overflow: hidden;
	word-wrap: normal !important;
}

.skip-link {
	position: fixed;
	top: -60px; left: 16px;
	z-index: 10000;
	background: var(--accent);
	color: #fff;
	padding: 10px 18px;
	border-radius: 8px;
	transition: top .2s;
}
.skip-link:focus { top: 12px; }

.container {
	width: min(1180px, 92vw);
	margin-inline: auto;
}

.section {
	padding: clamp(72px, 12vh, 130px) 0;
	position: relative;
}
.section--alt { background: var(--bg-alt); transition: background-color .5s var(--ease); }

/* Section headings with the signature red rule */
.section-head { margin-bottom: clamp(36px, 6vh, 64px); max-width: 720px; }
.section-head .kicker {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-display);
	font-size: .8rem;
	letter-spacing: .28em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 14px;
}
.section-head .kicker::before {
	content: "";
	width: 34px; height: 2px;
	background: var(--accent);
	transform-origin: left center;
}
.section-head h2 {
	font-size: clamp(1.9rem, 4.5vw, 3rem);
	margin: 0 0 .35em;
}
.section-head p { color: var(--muted); margin: 0; }

/* Generic reveal targets (GSAP animates these; visible by default if JS fails) */
.js .gsap-reveal { opacity: 0; transform: translateY(34px); }
.no-js .gsap-reveal { opacity: 1; transform: none; }

/* =====================================================================
   3. BUTTONS
   ===================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 13px 26px;
	border-radius: 999px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: .92rem;
	letter-spacing: .03em;
	border: 1px solid transparent;
	transition: transform .25s var(--ease), box-shadow .25s var(--ease),
	            background-color .25s, color .25s, border-color .25s;
	will-change: transform;
}
.btn:active { transform: scale(.97); }

.btn--red {
	background: var(--accent);
	color: #fff;
}
.btn--red:hover {
	background: var(--accent-strong);
	box-shadow: 0 8px 30px var(--glow);
	transform: translateY(-2px);
}

.btn--ghost {
	background: transparent;
	color: var(--text);
	border-color: var(--line);
}
.btn--ghost:hover {
	border-color: var(--accent);
	color: var(--accent);
	transform: translateY(-2px);
}

.btn--small { padding: 9px 18px; font-size: .82rem; }

/* Inline icons inherit a sane size everywhere they appear */
.btn svg,
.read-more svg,
.cert-view svg,
.project-flip-hint svg { width: 16px; height: 16px; flex: none; }

/* =====================================================================
   4. HEADER / NAVIGATION
   ===================================================================== */
.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 900;
	height: var(--header-h);
	display: flex;
	align-items: center;
	transition: background-color .35s, border-color .35s, backdrop-filter .35s;
	border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
	background: var(--scrim);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-bottom-color: var(--line);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	width: min(1320px, 94vw);
	margin-inline: auto;
}

.site-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.15rem;
	letter-spacing: -0.01em;
	white-space: nowrap;
}
.site-brand .brand-mark {
	width: 10px; height: 10px;
	background: var(--accent);
	border-radius: 2px;
	transform: rotate(45deg);
	box-shadow: 0 0 14px var(--glow);
	flex: none;
}
.site-brand .custom-logo { max-height: 40px; width: auto; }

.main-nav ul {
	display: flex;
	gap: clamp(14px, 2.2vw, 30px);
	list-style: none;
	margin: 0; padding: 0;
}
.main-nav a {
	position: relative;
	font-size: .9rem;
	font-weight: 500;
	color: var(--muted);
	padding: 8px 2px;
	transition: color .25s;
}
.main-nav a::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0;
	width: 100%; height: 2px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform .35s var(--ease);
}
.main-nav a:hover,
.main-nav a.is-active { color: var(--text); }
.main-nav a:hover::after,
.main-nav a.is-active::after {
	transform: scaleX(1);
	transform-origin: left center;
}

.header-actions { display: flex; align-items: center; gap: 14px; }

/* Dark / light toggle — animated sun/moon morph */
.theme-toggle {
	position: relative;
	width: 44px; height: 44px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: transparent;
	color: var(--text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
	flex: none;
}
.theme-toggle:hover {
	border-color: var(--accent);
	box-shadow: 0 0 16px var(--glow);
	transform: rotate(40deg);
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
	position: absolute;
	transition: transform .5s var(--ease), opacity .4s;
}
:root[data-theme="dark"]  .theme-toggle .icon-sun  { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="dark"]  .theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
:root[data-theme="light"] .theme-toggle .icon-sun  { opacity: 0; transform: rotate(90deg) scale(.4); }
:root[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }

/* Mobile hamburger */
.nav-toggle {
	display: none;
	width: 44px; height: 44px;
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 10px;
	position: relative;
	flex: none;
}
.nav-toggle span {
	position: absolute;
	left: 11px; right: 11px;
	height: 2px;
	background: var(--text);
	transition: transform .35s var(--ease), opacity .25s, top .35s var(--ease), background-color .3s;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] span { background: var(--accent); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.main-nav {
		position: fixed;
		top: var(--header-h);
		left: 0; right: 0;
		background: var(--scrim);
		-webkit-backdrop-filter: blur(18px);
		backdrop-filter: blur(18px);
		border-bottom: 1px solid var(--line);
		padding: 10px 4vw 26px;
		transform: translateY(-16px);
		opacity: 0;
		pointer-events: none;
		transition: transform .35s var(--ease), opacity .3s;
	}
	.main-nav.is-open {
		transform: translateY(0);
		opacity: 1;
		pointer-events: auto;
	}
	.main-nav ul { flex-direction: column; gap: 4px; }
	.main-nav a { display: block; padding: 12px 6px; font-size: 1.05rem; }
	.header-cta .btn-label-long { display: none; }
}
@media (min-width: 901px) {
	.header-cta .btn-label-short { display: none; }
}

/* =====================================================================
   5. HERO
   ===================================================================== */
.hero {
	position: relative;
	min-height: 100svh;
	display: flex;
	align-items: center;
	overflow: hidden;
	background: var(--bg);
}
#hero-canvas {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	display: block;
}
/* Graceful WebGL fallback — shown when JS adds .no-webgl (or if JS never runs) */
.hero-fallback {
	position: absolute;
	inset: 0;
	background: var(--hero-fallback);
	opacity: 0;
	transition: opacity .8s;
}
.no-webgl .hero-fallback, .no-js .hero-fallback { opacity: 1; }
.no-webgl #hero-canvas { display: none; }
.hero-fallback::after {
	/* faint grid to keep some texture without WebGL */
	content: "";
	position: absolute; inset: 0;
	background-image:
		linear-gradient(var(--line) 1px, transparent 1px),
		linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 64px 64px;
	opacity: .25;
	mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 100%);
	-webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 100%);
}

.hero-content {
	position: relative;
	z-index: 2;
	padding-top: var(--header-h);
}
.hero-kicker {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-display);
	letter-spacing: .3em;
	text-transform: uppercase;
	font-size: .78rem;
	color: var(--muted);
	margin-bottom: 22px;
}
.hero-kicker::before { content: ""; width: 42px; height: 2px; background: var(--accent); }

.hero-title {
	font-size: clamp(2.6rem, 8.5vw, 6.2rem);
	margin: 0 0 18px;
	line-height: 1.02;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; will-change: transform; }
.hero-title .accent-dot { color: var(--accent); }

.hero-tagline {
	font-size: clamp(1.02rem, 2vw, 1.3rem);
	color: var(--muted);
	max-width: 560px;
	margin: 0 0 34px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-scroll-cue {
	position: absolute;
	left: 50%;
	bottom: 26px;
	transform: translateX(-50%);
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: var(--muted);
	font-size: .7rem;
	letter-spacing: .3em;
	text-transform: uppercase;
}
.hero-scroll-cue .cue-line {
	width: 2px; height: 44px;
	background: linear-gradient(var(--accent), transparent);
	animation: cue-drop 2s var(--ease) infinite;
	transform-origin: top center;
}
@keyframes cue-drop {
	0%   { transform: scaleY(0); opacity: 0; }
	35%  { transform: scaleY(1); opacity: 1; }
	100% { transform: scaleY(1) translateY(18px); opacity: 0; }
}

/* =====================================================================
   6. TIMELINE
   ===================================================================== */
.timeline {
	position: relative;
	max-width: 880px;
	margin-inline: auto;
	padding: 10px 0 30px;
}
.timeline-rail {
	position: absolute;
	top: 0; bottom: 0;
	left: 22px;
	width: 2px;
	background: var(--line);
	overflow: hidden;
}
.timeline-rail .rail-progress {
	position: absolute;
	inset: 0;
	background: linear-gradient(var(--accent), var(--accent-strong));
	transform: scaleY(0);
	transform-origin: top center;
	box-shadow: 0 0 18px var(--glow);
}
.no-js .timeline-rail .rail-progress { transform: none; }

.timeline-item {
	position: relative;
	padding: 0 0 54px 72px;
}
.timeline-item:last-child { padding-bottom: 6px; }

.timeline-node {
	position: absolute;
	left: 0;
	top: 2px;
	width: 46px; height: 46px;
	border-radius: 50%;
	background: var(--surface);
	border: 1px solid var(--line);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent);
	transition: border-color .3s, box-shadow .3s, background-color .5s;
	z-index: 1;
}
.timeline-node svg { width: 20px; height: 20px; }
.timeline-item:hover .timeline-node,
.timeline-item.is-active .timeline-node {
	border-color: var(--accent);
	box-shadow: 0 0 22px var(--glow);
}

.timeline-date {
	font-family: var(--font-display);
	font-size: .78rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 6px;
}
.timeline-item h3 { font-size: 1.28rem; margin-bottom: .35em; }
.timeline-item p { color: var(--muted); margin: 0; max-width: 60ch; }

@media (min-width: 860px) {
	.timeline-rail { left: 50%; margin-left: -1px; }
	.timeline-item {
		width: 50%;
		padding: 0 0 64px 0;
	}
	.timeline-item:nth-child(odd) {
		left: 0;
		padding-right: 76px;
		text-align: right;
	}
	.timeline-item:nth-child(odd) p { margin-left: auto; }
	.timeline-item:nth-child(even) {
		left: 50%;
		padding-left: 76px;
	}
	.timeline-item:nth-child(odd) .timeline-node  { left: auto; right: -23px; }
	.timeline-item:nth-child(even) .timeline-node { left: -23px; }
}

/* =====================================================================
   7. TOOLS & CERTIFICATIONS
   ===================================================================== */
.tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px;
}
.tool-tile {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 26px 18px 22px;
	text-align: center;
	transition: transform .35s var(--ease), border-color .3s, box-shadow .35s, background-color .5s;
	overflow: hidden;
}
.tool-tile::before {
	/* red highlight line that sweeps in on hover */
	content: "";
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 3px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .4s var(--ease);
}
.tool-tile:hover {
	transform: translateY(-6px);
	border-color: var(--accent);
	box-shadow: 0 16px 40px rgba(0,0,0,.35), 0 0 24px var(--glow);
}
:root[data-theme="light"] .tool-tile:hover { box-shadow: 0 16px 32px rgba(0,0,0,.12), 0 0 24px var(--glow); }
.tool-tile:hover::before { transform: scaleX(1); }

.tool-icon {
	width: 52px; height: 52px;
	margin: 0 auto 14px;
	border-radius: 12px;
	background: var(--accent-dim);
	color: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
}
.tool-icon svg { width: 26px; height: 26px; }
.tool-tile h3 { font-size: .98rem; margin: 0 0 4px; letter-spacing: 0; }
.tool-tile .tool-type {
	font-size: .72rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--muted);
}
.tool-tile .cert-view {
	margin-top: 12px;
	background: none;
	border: none;
	color: var(--accent);
	font-size: .8rem;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 0;
}
.tool-tile .cert-view:hover { color: var(--accent-strong); }
.tool-tile--cert { cursor: pointer; }

/* =====================================================================
   8. 3D PROJECT GALLERY
   ===================================================================== */
.projects-stage {
	position: relative;
	height: 560px;
	perspective: 1600px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.projects-ring {
	position: relative;
	width: 340px;
	height: 460px;
	transform-style: preserve-3d;
	transition: transform 1s var(--ease);
}
.no-js .projects-ring { transform: none !important; }

.project-card {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	cursor: pointer;
}
.project-card-inner {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	transition: transform .8s var(--ease);
}
.project-card.is-flipped .project-card-inner { transform: rotateY(180deg); }

.project-face {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	border-radius: 18px;
	border: 1px solid var(--line);
	background: var(--surface);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color .3s, box-shadow .35s, background-color .5s;
}
.project-card:hover .project-face {
	border-color: var(--accent);
	box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 30px var(--glow);
}
:root[data-theme="light"] .project-card:hover .project-face { box-shadow: 0 24px 48px rgba(0,0,0,.14), 0 0 30px var(--glow); }

.project-face--back { transform: rotateY(180deg); padding: 26px; justify-content: center; gap: 14px; }

.project-visual {
	height: 200px;
	background:
		radial-gradient(140px 90px at 70% 30%, var(--accent-dim), transparent 70%),
		linear-gradient(135deg, var(--surface-2), var(--surface));
	position: relative;
	border-bottom: 1px solid var(--line);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent);
}
.project-visual svg { width: 64px; height: 64px; opacity: .9; }
.project-visual .project-index {
	position: absolute;
	top: 14px; left: 18px;
	font-family: var(--font-display);
	font-size: .78rem;
	letter-spacing: .25em;
	color: var(--muted);
}

.project-meta { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-meta h3 { font-size: 1.25rem; margin: 0; }
.project-meta .project-desc { color: var(--muted); font-size: .95rem; margin: 0; flex: 1; }
.project-meta .project-flip-hint {
	font-size: .74rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--accent);
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.project-face--back h3 { font-size: 1.15rem; margin: 0; }
.project-face--back .stack-label {
	font-size: .72rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--muted);
}
.project-stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.project-stack li {
	font-size: .78rem;
	padding: 5px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--muted);
}
.project-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.projects-controls {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 18px;
	margin-top: 8px;
}
.ring-btn {
	width: 52px; height: 52px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--text);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color .3s, color .3s, box-shadow .3s, transform .2s;
}
.ring-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
	box-shadow: 0 0 18px var(--glow);
	transform: translateY(-2px);
}
.ring-btn svg { width: 20px; height: 20px; }
.ring-dots { display: flex; gap: 8px; }
.ring-dots button {
	width: 10px; height: 10px;
	border-radius: 50%;
	border: none;
	background: var(--line);
	padding: 0;
	transition: background-color .3s, transform .3s;
}
.ring-dots button.is-active { background: var(--accent); transform: scale(1.3); }

@media (max-width: 760px) {
	.projects-stage { height: auto; perspective: none; display: block; }
	.projects-ring {
		width: auto; height: auto;
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: min(78vw, 320px);
		gap: 18px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding: 6px 4vw 22px;
		transform: none !important;
		-webkit-overflow-scrolling: touch;
	}
	.project-card {
		position: relative;
		height: 460px;
		scroll-snap-align: center;
		transform: none !important;
	}
	.projects-controls .ring-btn { display: none; }
}

/* =====================================================================
   9. BLOG
   ===================================================================== */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 22px;
}
.post-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .35s var(--ease), border-color .3s, box-shadow .35s, background-color .5s;
}
.post-card:hover {
	transform: translateY(-6px);
	border-color: var(--accent);
	box-shadow: 0 18px 44px rgba(0,0,0,.35), 0 0 22px var(--glow);
}
:root[data-theme="light"] .post-card:hover { box-shadow: 0 18px 36px rgba(0,0,0,.1), 0 0 22px var(--glow); }

.post-card-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); position: relative; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-thumb .thumb-placeholder {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	color: var(--accent);
	background:
		radial-gradient(120px 80px at 70% 30%, var(--accent-dim), transparent 70%),
		var(--surface-2);
}
.post-card-thumb .thumb-placeholder svg { width: 40px; height: 40px; }

.post-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card .post-date {
	font-size: .74rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--accent);
}
.post-card h3 { font-size: 1.18rem; margin: 0; }
.post-card h3 a:hover { color: var(--accent); }
.post-card .post-excerpt { color: var(--muted); font-size: .93rem; margin: 0; flex: 1; }
.post-card .read-more {
	font-size: .82rem;
	font-weight: 600;
	color: var(--accent);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.post-card .read-more:hover { color: var(--accent-strong); gap: 10px; }
.blog-section-footer { margin-top: 40px; text-align: center; }

/* Archive / single */
.page-hero {
	padding: calc(var(--header-h) + clamp(48px, 9vh, 90px)) 0 clamp(40px, 7vh, 70px);
	background: var(--bg-alt);
	border-bottom: 1px solid var(--line);
	transition: background-color .5s;
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0; }
.page-hero .page-hero-meta { color: var(--muted); margin-top: 10px; display: flex; flex-wrap: wrap; gap: 16px; font-size: .9rem; }
.page-hero .page-hero-meta .meta-accent { color: var(--accent); }

.content-area { padding: clamp(48px, 8vh, 80px) 0; }
.entry-content {
	max-width: 760px;
	margin-inline: auto;
	font-size: 1.05rem;
}
.entry-content h2 { margin-top: 1.8em; font-size: 1.7rem; }
.entry-content h3 { margin-top: 1.5em; font-size: 1.3rem; }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 22px;
	border-left: 3px solid var(--accent);
	color: var(--muted);
	font-style: italic;
}
.entry-content pre {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 18px 20px;
	overflow-x: auto;
	font-size: .88rem;
}
.entry-content code { background: var(--surface-2); padding: 2px 7px; border-radius: 6px; font-size: .9em; }
.entry-content pre code { background: none; padding: 0; }
.wp-block-image figcaption, .wp-caption-text { color: var(--muted); font-size: .82rem; text-align: center; }

.post-navigation, .pagination { margin: 48px auto 0; max-width: 760px; }
.pagination { display: flex; justify-content: center; }
.nav-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.nav-links .page-numbers {
	min-width: 42px; height: 42px;
	padding: 0 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--line);
	border-radius: 10px;
	font-size: .9rem;
	color: var(--muted);
	transition: all .25s;
}
.nav-links .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.nav-links a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }

.post-tags { max-width: 760px; margin: 34px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags a {
	font-size: .78rem;
	padding: 6px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--muted);
	transition: all .25s;
}
.post-tags a:hover { border-color: var(--accent); color: var(--accent); }

/* Comments */
.comments-area { max-width: 760px; margin: 60px auto 0; }
.comments-area .comments-title { font-size: 1.4rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { border-top: 1px solid var(--line); padding: 24px 0; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-author { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: .78rem; color: var(--muted); margin: 4px 0 10px; }
.comment-reply-link { color: var(--accent); font-size: .82rem; font-weight: 600; }
.comment-form label { display: block; font-size: .85rem; margin-bottom: 6px; color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea { width: 100%; }
.comment-form .form-submit { margin-top: 14px; }
.comment-form input[type="submit"] {
	background: var(--accent); color: #fff; border: none;
	padding: 12px 26px; border-radius: 999px; font-weight: 600;
	transition: background-color .25s, box-shadow .25s;
}
.comment-form input[type="submit"]:hover { background: var(--accent-strong); box-shadow: 0 8px 24px var(--glow); }

/* =====================================================================
   10. CONTACT
   ===================================================================== */
.contact-layout {
	display: grid;
	gap: 40px;
	grid-template-columns: 1fr;
	align-items: start;
}
@media (min-width: 900px) {
	.contact-layout { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; }
}
.contact-intro p { color: var(--muted); }
.contact-channels { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.contact-channels li { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.contact-channels .channel-icon {
	width: 42px; height: 42px; flex: none;
	border-radius: 10px;
	background: var(--accent-dim);
	color: var(--accent);
	display: flex; align-items: center; justify-content: center;
}
.contact-channels .channel-icon svg { width: 20px; height: 20px; }
.contact-channels a:hover { color: var(--accent); }

.contact-form {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: clamp(24px, 4vw, 40px);
	position: relative;
	overflow: hidden;
	transition: background-color .5s, border-color .3s;
}
.contact-form::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--accent), transparent 70%);
}
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr; margin-bottom: 18px; }
@media (min-width: 640px) { .form-row--split { grid-template-columns: 1fr 1fr; } }

.form-field label {
	display: block;
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .06em;
	margin-bottom: 8px;
	color: var(--muted);
	text-transform: uppercase;
}
.form-field .req { color: var(--accent); }

input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="search"], textarea, select {
	width: 100%;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 10px;
	color: var(--text);
	padding: 13px 16px;
	font-family: inherit;
	font-size: .96rem;
	transition: border-color .25s, box-shadow .25s, background-color .5s;
}
input:focus, textarea:focus, select:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-dim);
}
textarea { min-height: 150px; resize: vertical; }

/* Honeypot — visually removed, still in DOM for bots */
.hp-field {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.form-status {
	display: none;
	align-items: center;
	gap: 12px;
	margin-top: 18px;
	padding: 14px 18px;
	border-radius: 10px;
	font-size: .92rem;
	border: 1px solid transparent;
}
.form-status.is-visible { display: flex; }
.form-status--success { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.form-status--success .status-icon { color: var(--accent); }
.form-status--error { border-color: var(--accent); background: var(--accent-dim); color: var(--text); }
.form-status .status-icon { flex: none; width: 22px; height: 22px; }
.form-status .status-icon circle,
.form-status .status-icon path { stroke-dasharray: 80; stroke-dashoffset: 80; }
.form-status.is-visible .status-icon circle { animation: draw .6s var(--ease) forwards; }
.form-status.is-visible .status-icon path { animation: draw .5s .35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.contact-submit { min-width: 190px; position: relative; }
.contact-submit.is-loading { pointer-events: none; opacity: .7; }
.contact-submit .spinner {
	display: none;
	width: 16px; height: 16px;
	border: 2px solid rgba(255,255,255,.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin .7s linear infinite;
}
.contact-submit.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Contact Form 7 support (if the plugin is used instead of the built-in form) */
.wpcf7 input[type="submit"] {
	background: var(--accent); color: #fff; border: none;
	padding: 13px 28px; border-radius: 999px; font-weight: 600;
}
.wpcf7 input[type="submit"]:hover { background: var(--accent-strong); }
.wpcf7-not-valid-tip { color: var(--accent); font-size: .8rem; }
.wpcf7-response-output { border-radius: 10px !important; border-color: var(--line) !important; padding: 12px 16px !important; }

/* =====================================================================
   11. FOOTER
   ===================================================================== */
.site-footer {
	border-top: 1px solid var(--line);
	background: var(--bg-alt);
	padding: 46px 0 34px;
	transition: background-color .5s;
}
.footer-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: center;
	justify-content: space-between;
}
.footer-brand { font-family: var(--font-display); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-mark { width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); border-radius: 2px; }
.footer-meta { color: var(--muted); font-size: .85rem; }
.footer-meta a { color: var(--accent); }
.back-to-top {
	display: inline-flex; align-items: center; gap: 8px;
	color: var(--muted); font-size: .85rem; background: none; border: none;
	transition: color .25s;
}
.back-to-top:hover { color: var(--accent); }
.back-to-top svg { width: 16px; height: 16px; }

/* =====================================================================
   12. MODALS (resume viewer + certificate lightbox)
   ===================================================================== */
.modal {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vh 4vw;
	visibility: hidden;
	opacity: 0;
	transition: opacity .35s, visibility .35s;
}
.modal.is-open { visibility: visible; opacity: 1; }
.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 4, 6, 0.86);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.modal-panel {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	width: min(960px, 100%);
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateY(26px) scale(.97);
	transition: transform .4s var(--ease);
	box-shadow: 0 40px 120px rgba(0,0,0,.6);
}
.modal.is-open .modal-panel { transform: translateY(0) scale(1); }
.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--line);
}
.modal-header h3 { margin: 0; font-size: 1.02rem; }
.modal-actions { display: flex; align-items: center; gap: 10px; }
.modal-close {
	width: 40px; height: 40px;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: transparent;
	color: var(--text);
	display: flex; align-items: center; justify-content: center;
	transition: all .25s;
	flex: none;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { flex: 1; min-height: 0; overflow: auto; background: var(--surface-2); }
.modal-body iframe { display: block; width: 100%; height: min(76vh, 900px); border: none; }
.modal-body .lightbox-img { margin: 0 auto; max-height: 76vh; width: auto; object-fit: contain; }
.modal-body .lightbox-caption { text-align: center; color: var(--muted); font-size: .85rem; padding: 12px 18px 20px; }

body.modal-open { overflow: hidden; }

/* =====================================================================
   13. UTILITIES / WP CORE
   ===================================================================== */
.alignwide { width: min(1100px, 94vw); margin-inline: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.aligncenter { margin-inline: auto; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.sticky { position: relative; }
.sticky::before {
	content: "Featured";
	display: inline-block;
	font-size: .68rem;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: #fff;
	background: var(--accent);
	border-radius: 6px;
	padding: 3px 10px;
	margin-bottom: 10px;
}
.bypostauthor { display: block; }

.error-404 { text-align: center; padding: 40px 0 20px; }
.error-404 .error-code {
	font-family: var(--font-display);
	font-size: clamp(5rem, 20vw, 11rem);
	font-weight: 700;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 2px var(--line);
	position: relative;
}
.error-404 .error-code span { color: var(--accent); -webkit-text-stroke: 0; }
