@charset "utf-8";

/* ============================================================
   V4 — HORIZON NOCTURNE
   Editorial Magazine — Mature / Composed / Two-column spreads
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
	--bg: #0f1219;
	--bg-alt: #141922;
	--ivory: #dcd8d0;
	--ivory-dim: #a8a49c;
	--steel: #5b7eaa;
	--steel-light: #8facc8;
	--slate: #1e2430;
	--dim: #4a5060;
	--line: #1e2430;
	--faint: #343c4e;

	--display: 'Playfair Display', 'Georgia', serif;
	--body: 'Work Sans', 'Helvetica Neue', sans-serif;
}

html { scroll-behavior: smooth; }

body {
	font-family: var(--body);
	background: var(--bg);
	color: var(--ivory);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	line-height: 1.65;
}

/* --- Ambient glow (moon behind clouds) --- */
.ambient {
	position: fixed;
	top: -180px; right: -100px;
	width: 500px; height: 500px;
	background: radial-gradient(circle, rgba(91, 126, 170, 0.06) 0%, transparent 70%);
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
}
.ambient-bottom {
	position: fixed;
	bottom: -200px; left: -100px;
	width: 500px; height: 500px;
	background: radial-gradient(circle, rgba(91, 126, 170, 0.03) 0%, transparent 70%);
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
}

/* --- Night grain --- */
.night-grain {
	position: fixed; inset: 0; z-index: 9999;
	pointer-events: none; opacity: 0.03;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	background-size: 128px;
}

/* --- Header --- */
.header {
	position: fixed; top: 0; left: 0; width: 100%;
	z-index: 100;
	background: rgba(15, 18, 25, 0.88);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--line);
	transition: background 0.3s;
}
.header.scrolled { background: rgba(15, 18, 25, 0.96); }

.nav {
	max-width: 1280px; margin: 0 auto;
	display: flex; justify-content: space-between; align-items: center;
	padding: 18px 48px;
}

.nav-brand {
	display: flex; align-items: center; gap: 8px;
	font-family: var(--display);
	font-size: 20px; font-weight: 400;
	color: var(--ivory);
	text-decoration: none;
	letter-spacing: 0.3px;
}
.nav-brand svg { color: var(--steel); }

.nav-right { display: flex; gap: 8px; }

.nl {
	font-family: var(--body);
	font-size: 12px; font-weight: 400;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--dim);
	text-decoration: none;
	padding: 6px 16px;
	position: relative;
	transition: color 0.3s;
}
.nl::after {
	content: ''; position: absolute;
	bottom: 0; left: 16px; right: 16px;
	height: 1px; background: var(--steel);
	transform: scaleX(0); transform-origin: left;
	transition: transform 0.35s ease;
}
.nl:hover, .nl.active { color: var(--ivory); }
.nl:hover::after, .nl.active::after { transform: scaleX(1); }

.burger {
	display: none; flex-direction: column; gap: 5px;
	cursor: pointer; background: none; border: none; padding: 6px;
}
.burger span { width: 22px; height: 1px; background: var(--ivory); transition: 0.3s; }
.burger.active span:first-child { transform: rotate(45deg) translate(2px, 3px); }
.burger.active span:last-child { transform: rotate(-45deg) translate(2px, -3px); }

/* --- Small label --- */
.small-label {
	display: flex; align-items: center; gap: 8px;
	font-family: var(--body);
	font-size: 11px; font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 3px;
	color: var(--steel);
	margin-bottom: 12px;
}
.small-label svg { opacity: 0.6; }

.mag-heading {
	font-family: var(--display);
	font-size: clamp(32px, 4vw, 48px);
	font-weight: 400;
	line-height: 1.2;
	margin-bottom: 40px;
	color: var(--ivory);
	display: flex; align-items: center; gap: 14px;
}
.mh-icon { color: var(--steel); flex-shrink: 0; opacity: 0.5; }

/* --- Hero — Magazine spread --- */
.hero {
	min-height: 100vh;
	max-width: 1280px; margin: 0 auto;
	padding: 140px 48px 80px;
	display: grid;
	grid-template-columns: 1.3fr 0.7fr;
	gap: 64px;
	align-items: center;
	position: relative;
	z-index: 1;
}

.hero-kicker {
	display: flex; align-items: center; gap: 8px;
	font-family: var(--body);
	font-size: 11px; font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 3px;
	color: var(--steel);
	margin-bottom: 24px;
	opacity: 0; animation: magIn 0.8s 0.2s ease forwards;
}
.hero-kicker svg { opacity: 0.5; }

.hero-title {
	font-family: var(--display);
	font-size: clamp(56px, 8vw, 96px);
	font-weight: 400;
	line-height: 1.05;
	margin-bottom: 28px;
}

.ht-line {
	display: block;
	opacity: 0; animation: magIn 0.8s ease forwards;
}
.ht-line:nth-child(1) { animation-delay: 0.35s; }
.ht-line:nth-child(2) { animation-delay: 0.5s; }
.ht-accent { font-style: italic; color: var(--steel); }

.hero-intro {
	font-size: 16px; font-weight: 300;
	color: var(--ivory-dim);
	line-height: 1.8;
	max-width: 480px;
	opacity: 0; animation: magIn 0.8s 0.7s ease forwards;
}

.hero-divider {
	display: flex; align-items: center; gap: 12px;
	margin-bottom: 20px;
	opacity: 0; animation: magIn 0.6s 0.65s ease forwards;
}
.hd-line { width: 60px; height: 1px; background: var(--steel); }
.hero-divider svg { color: var(--steel); }

.portrait-frame { position: relative; display: inline-block; }
.hero-portrait {
	width: 100%;
	max-width: 360px;
	aspect-ratio: 3/4;
	object-fit: cover;
	filter: grayscale(25%) contrast(1.05) brightness(0.95);
	border: 1px solid var(--line);
	opacity: 0; animation: magIn 1s 0.5s ease forwards;
}
.portrait-glow {
	position: absolute; inset: -20px;
	background: radial-gradient(circle, rgba(91,126,170,0.06) 0%, transparent 60%);
	pointer-events: none;
	z-index: -1;
}

/* --- Projects --- */
.projects-section {
	position: relative; z-index: 1;
	max-width: 1280px; margin: 0 auto;
	padding: 80px 48px 100px;
	border-top: 1px solid var(--line);
}

.proj-header {
	display: flex; justify-content: space-between; align-items: flex-end;
	margin-bottom: 48px;
}

.proj-arrows {
	display: flex; align-items: center; gap: 16px;
}

.arr-btn {
	width: 40px; height: 40px;
	background: none;
	border: 1px solid var(--faint);
	border-radius: 50%;
	color: var(--ivory);
	font-size: 16px;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: border-color 0.3s, color 0.3s;
}
.arr-btn:hover { border-color: var(--steel); color: var(--steel); }

.arr-count {
	font-size: 12px; letter-spacing: 2px;
	color: var(--dim);
}

/* Project stage */
.proj-stage { position: relative; }

.mag-card {
	display: none;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 48px;
	align-items: start;
	opacity: 0; animation: magFade 0.5s ease forwards;
}
.mag-card.active { display: grid; }

.mag-card-img {
	aspect-ratio: 16/10;
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--bg-alt);
}
.mag-card-img img {
	width: 100%; height: 100%;
	object-fit: cover;
	filter: grayscale(30%) contrast(1.1);
	transition: filter 0.5s, transform 0.6s;
}
.mag-card:hover .mag-card-img img {
	filter: grayscale(0%) contrast(1.15);
	transform: scale(1.03);
}

.mag-card-body { padding: 8px 0; }

.mcb-num {
	font-family: var(--display);
	font-size: 14px; font-style: italic;
	color: var(--dim);
	margin-bottom: 12px;
}

.mcb-title {
	font-family: var(--display);
	font-size: 32px; font-weight: 400;
	margin-bottom: 14px;
	transition: color 0.3s;
}
.mag-card:hover .mcb-title { color: var(--steel); }

.mcb-desc {
	font-size: 14px; font-weight: 300;
	color: var(--ivory-dim);
	line-height: 1.75;
	margin-bottom: 20px;
}

.mcb-meta {
	font-size: 13px; color: var(--dim);
	line-height: 1.8;
	margin-bottom: 20px;
}
.mcb-meta strong { color: var(--ivory-dim); font-weight: 500; }

.mcb-link {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12px; font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--steel);
	text-decoration: none;
	border-bottom: 1px solid var(--faint);
	padding-bottom: 4px;
	transition: border-color 0.3s, color 0.3s;
}
.mcb-link:hover { border-color: var(--steel); color: var(--steel-light); }
.mcb-link svg { transition: transform 0.3s; }
.mcb-link:hover svg { transform: translate(2px, -2px); }

/* --- About --- */
.about-section {
	position: relative; z-index: 1;
	max-width: 1280px; margin: 0 auto;
	padding: 100px 48px;
	border-top: 1px solid var(--line);
}

.about-cols {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 80px;
	align-items: start;
}

.about-body {
	font-size: 15px; font-weight: 300;
	color: var(--ivory-dim);
	line-height: 1.8;
	margin-bottom: 24px;
}

.mag-link {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12px; font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--steel);
	text-decoration: none;
	border-bottom: 1px solid var(--faint);
	padding-bottom: 3px;
	transition: border-color 0.3s;
}
.mag-link:hover { border-color: var(--steel); }
.mag-link svg { transition: transform 0.3s; }
.mag-link:hover svg { transform: translate(2px, -2px); }

/* Pillars */
.about-col-pillars {}

.mag-pillar {
	padding: 24px 0;
	border-bottom: 1px solid var(--line);
	position: relative;
}
.mag-pillar:last-child { border-bottom: none; }
/* Left accent on hover */
.mag-pillar::before {
	content: ''; position: absolute;
	left: -16px; top: 24px; bottom: 24px;
	width: 2px; background: var(--steel);
	opacity: 0; transition: opacity 0.4s;
}
.mag-pillar:hover::before { opacity: 1; }

.mp-icon-wrap {
	color: var(--steel); opacity: 0.4;
	margin-bottom: 10px;
	transition: opacity 0.3s;
}
.mag-pillar:hover .mp-icon-wrap { opacity: 0.8; }

.mp-num {
	font-family: var(--display);
	font-size: 13px; font-style: italic;
	color: var(--steel);
	display: block;
	margin-bottom: 8px;
}

.mp-title {
	font-family: var(--display);
	font-size: 22px; font-weight: 400;
	margin-bottom: 8px;
}

.mp-desc {
	font-size: 14px; font-weight: 300;
	color: var(--ivory-dim);
	line-height: 1.7;
}

/* --- More --- */
.more-section {
	position: relative; z-index: 1;
	max-width: 1280px; margin: 0 auto;
	padding: 100px 48px;
	border-top: 1px solid var(--line);
}

.more-entries {}

.me {
	display: grid;
	grid-template-columns: 40px 24px 1fr 24px;
	align-items: center;
	gap: 16px;
	padding: 20px 0;
	border-bottom: 1px solid var(--line);
	text-decoration: none;
	color: inherit;
	transition: padding-left 0.3s;
}
.me:first-child { border-top: 1px solid var(--line); }
.me:hover { padding-left: 12px; }

.me-icon {
	color: var(--steel); opacity: 0.4;
	display: flex; flex-shrink: 0;
	transition: opacity 0.3s;
}
.me:hover .me-icon { opacity: 0.9; }

.me-num {
	font-family: var(--display);
	font-size: 13px; font-style: italic;
	color: var(--dim);
}

.me-title {
	font-family: var(--display);
	font-size: 22px; font-weight: 400;
	color: var(--ivory-dim);
	transition: color 0.3s;
}
.me:hover .me-title { color: var(--ivory); }

.me-arrow {
	font-size: 16px; color: var(--dim);
	transition: color 0.3s;
}
.me:hover .me-arrow { color: var(--steel); }

/* --- Skills --- */
.skills-section {
	position: relative; z-index: 1;
	max-width: 1280px; margin: 0 auto;
	padding: 100px 48px;
	border-top: 1px solid var(--line);
}

.sk-tabs {
	display: flex; gap: 0;
	margin-bottom: 40px;
	border-bottom: 1px solid var(--line);
}

.skt {
	font-family: var(--body);
	font-size: 12px; font-weight: 400;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--dim);
	background: none; border: none;
	padding: 10px 20px;
	cursor: pointer;
	position: relative;
	transition: color 0.3s;
}
.skt:hover, .skt.active { color: var(--ivory); }
.skt::after {
	content: ''; position: absolute;
	bottom: -1px; left: 0; right: 0;
	height: 1px; background: var(--steel);
	transform: scaleX(0); transition: transform 0.3s;
}
.skt.active::after { transform: scaleX(1); }

.sk-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0;
}

.sk-cell {
	padding: 20px 24px 20px 0;
	border-bottom: 1px solid var(--line);
}
.sk-cell:nth-child(2n) { padding-left: 24px; padding-right: 0; border-left: 1px solid var(--line); }

.sk-cell-icon {
	color: var(--steel); opacity: 0.4;
	margin-bottom: 8px;
	display: flex;
}

.sk-cell-name {
	font-family: var(--display);
	font-size: 18px; font-weight: 400;
	margin-bottom: 6px;
}

.sk-cell-desc {
	font-size: 13px; font-weight: 300;
	color: var(--ivory-dim);
	line-height: 1.6;
}

/* --- Contact --- */
.contact-section {
	position: relative; z-index: 1;
	max-width: 1280px; margin: 0 auto;
	padding: 100px 48px;
	border-top: 1px solid var(--line);
}

.ct-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.ct-block {
	padding: 28px 24px;
	border-right: 1px solid var(--line);
	text-decoration: none;
	color: inherit;
	display: block;
	transition: background 0.3s;
}
.ct-block:last-child { border-right: none; }
.ct-block:hover { background: var(--bg-alt); }

.ctb-icon {
	color: var(--steel); opacity: 0.4;
	display: block; margin-bottom: 10px;
	transition: opacity 0.3s;
}
.ct-block:hover .ctb-icon { opacity: 0.9; }

.ct-label {
	display: block;
	font-size: 11px; font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: var(--dim);
	margin-bottom: 8px;
}

.ct-val {
	display: block;
	font-family: var(--display);
	font-size: 18px;
	color: var(--ivory);
}

/* --- Footer --- */
.footer {
	position: relative; z-index: 1;
	border-top: 1px solid var(--line);
	padding: 60px 48px 32px;
	max-width: 1280px; margin: 0 auto;
}

.ft-text {
	font-size: 13px; font-weight: 300;
	color: var(--dim);
	line-height: 1.7;
	max-width: 560px;
	margin-bottom: 32px;
}

.ft-links {
	display: flex; gap: 24px; align-items: center;
	padding-top: 16px;
	border-top: 1px solid var(--line);
	flex-wrap: wrap;
}

.ft-links a {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 11px; font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: var(--dim);
	text-decoration: none;
	transition: color 0.3s;
}
.ft-links a:hover { color: var(--steel); }

.ft-links span {
	font-size: 11px;
	color: var(--faint);
	margin-left: auto;
}

/* --- Animations --- */
@keyframes magIn {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes magFade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.mag-reveal {
	opacity: 0; transform: translateY(14px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}
.mag-reveal.vis { opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 1024px) {
	.hero { grid-template-columns: 1fr; gap: 40px; }
	.hero-portrait { max-width: 260px; }
	.mag-card { grid-template-columns: 1fr; }
	.about-cols { grid-template-columns: 1fr; gap: 48px; }
	.sk-grid { grid-template-columns: 1fr; }
	.sk-cell:nth-child(2n) { padding-left: 0; border-left: none; }
}

@media (max-width: 768px) {
	.nav { padding: 14px 20px; }
	.nav-right {
		position: fixed; left: -100%; top: 54px;
		flex-direction: column;
		background: rgba(15,18,25,0.97);
		width: 100%; padding: 32px 20px;
		border-bottom: 1px solid var(--line);
		transition: left 0.3s;
	}
	.nav-right.active { left: 0; }
	.nl { font-size: 15px; padding: 12px 0; }
	.burger { display: flex; }
	.hero { padding: 120px 20px 60px; }
	.projects-section, .about-section, .more-section, .skills-section, .contact-section, .footer {
		padding-left: 20px; padding-right: 20px;
	}
	.proj-header { flex-direction: column; align-items: flex-start; gap: 16px; }
	.ct-row { grid-template-columns: 1fr; }
	.ct-block { border-right: none; border-bottom: 1px solid var(--line); }
	.ct-block:last-child { border-bottom: none; }
	.sk-tabs { flex-wrap: wrap; }
	.ft-links { flex-direction: column; gap: 12px; align-items: flex-start; }
	.ft-links span { margin-left: 0; }
}
