:root {
	--base: #0B0E11;
	--surf: #131A23;
	--card: #1E2329;
	--input: #2A3039;
	--bdr: rgba(255,255,255,0.08);
	--txt: #e2e8f0;
	--sec: #9CA3AF;
	--mut: #6B7280;
	--accent: #0EA5E9;
	--accent-hover: #38BDF8;
	--accent-glow: rgba(14,165,233,0.25);
	--danger: #EF4444;
	--success: #22C55E;
	--radius: 10px;
	--radius-sm: 6px;
	--radius-pill: 9999px;
	--shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
	--shadow-glow: 0 0 20px var(--accent-glow);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: var(--base);
	color: var(--txt);
	line-height: 1.65;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; width: 100%; flex: 1; }

/* Navbar */
.navbar {
	position: sticky; top: 0; z-index: 100;
	background: rgba(19,26,35,0.82);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--bdr);
	padding: 0.75rem 0;
}
.nav-inner {
	max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
	display: flex; align-items: center; gap: 1.5rem;
}
.nav-logo {
	font-weight: 700; font-size: 1.2rem; color: var(--txt); text-decoration: none;
	display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.01em;
}
.nav-logo svg { width: 24px; height: 24px; stroke: var(--accent); }
.nav-logo:hover { color: var(--txt); }
.nav-links { display: flex; gap: 0.25rem; flex: 1; }
.nav-links a, .nav-auth a {
	color: var(--sec); text-decoration: none; font-size: 0.875rem;
	padding: 0.4rem 0.75rem; border-radius: var(--radius-sm);
	transition: all 0.2s; font-weight: 500;
}
.nav-links a:hover, .nav-auth a:hover { color: var(--txt); background: var(--input); }
.nav-auth { display: flex; gap: 0.25rem; }

.nav-toggle {
	display: none; background: none; border: none; cursor: pointer;
	padding: 0.4rem; border-radius: var(--radius-sm); color: var(--sec); transition: all 0.2s;
}
.nav-toggle:hover { background: var(--input); color: var(--txt); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle.active .icon-menu { display: none; }
.nav-toggle.active .icon-close { display: block; }

@media (max-width: 768px) {
	.nav-toggle { display: flex; align-items: center; justify-content: center; }
	.nav-links {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		background: rgba(19,26,35,0.96); backdrop-filter: blur(16px);
		-webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--bdr);
		padding: 0.75rem 1.5rem; flex-direction: column; gap: 0.25rem; box-shadow: var(--shadow-lg);
	}
	.nav-links.open { display: flex; }
	.nav-links a { padding: 0.6rem 0.75rem; font-size: 1rem; }
	.nav-auth { margin-left: auto; }
}

/* Hero */
.hero {
	text-align: center; padding: 5rem 1.5rem 4rem; margin: 2rem 0;
	border-radius: var(--radius);
	background: linear-gradient(135deg, #0B0E11 0%, #131A23 30%, #1A2940 50%, #131A23 70%, #0B0E11 100%);
	background-size: 300% 300%; animation: gradientShift 8s ease infinite;
	position: relative; overflow: hidden; border: 1px solid var(--bdr);
}
.hero::before {
	content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
	background: radial-gradient(circle at 30% 40%, var(--accent-glow) 0%, transparent 50%),
	            radial-gradient(circle at 70% 60%, rgba(56,189,248,0.08) 0%, transparent 50%);
	pointer-events: none; animation: gradientShift 12s ease infinite;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 0.75rem; font-weight: 800; letter-spacing: -0.03em; position: relative; }
.hero p { color: var(--sec); font-size: 1.15rem; max-width: 560px; margin: 0 auto; position: relative; }

@keyframes gradientShift {
	0%, 100% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
}

/* Sections */
.projects-grid, .quick-links, section { margin: 2.5rem 0; }
h1 { font-size: 2rem; margin: 1.5rem 0 1rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; margin: 1.5rem 0 1rem; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 600; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; margin: 1rem 0; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 768px) { .grid, .grid-3 { grid-template-columns: 1fr; } }

/* Cards */
.card {
	background: var(--card); border: 1px solid var(--bdr); border-radius: var(--radius);
	padding: 1.5rem; text-decoration: none; color: var(--txt); display: block;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative;
}
.card:hover {
	border-color: rgba(14,165,233,0.3); transform: translateY(-3px);
	box-shadow: 0 8px 30px rgba(0,0,0,0.45), 0 0 0 1px rgba(14,165,233,0.15);
	color: var(--txt);
}
.card:active { transform: translateY(-1px); }
.card-icon { margin-bottom: 0.75rem; }
.card-icon svg { width: 28px; height: 28px; stroke: var(--accent); }
.card-body h3 { margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.5rem; }
.card-body h3 svg { width: 20px; height: 20px; stroke: var(--accent); flex-shrink: 0; }
.card-body p { color: var(--sec); font-size: 0.9rem; line-height: 1.5; }
.card-category {
	display: inline-block; margin-top: 0.75rem; padding: 0.25rem 0.65rem;
	background: rgba(14,165,233,0.12); border-radius: var(--radius-pill);
	font-size: 0.78rem; color: var(--accent); font-weight: 600; letter-spacing: 0.01em;
	border: 1px solid rgba(14,165,233,0.18);
}

/* Buttons */
.btn, button {
	background: var(--accent); color: #fff; border: none; padding: 0.55rem 1.35rem;
	border-radius: var(--radius-sm); cursor: pointer; font-size: 0.9rem; font-weight: 600;
	text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem;
	font-family: inherit; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); letter-spacing: 0.01em;
}
.btn:hover, button:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn:active, button:active { transform: translateY(0); box-shadow: none; }
.btn svg, button svg { width: 16px; height: 16px; }
button + button { margin-left: 0.5rem; }

/* Forms */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; color: var(--sec); font-size: 0.85rem; font-weight: 500; }
input, textarea, select {
	width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--bdr);
	border-radius: var(--radius-sm); background: var(--input); color: var(--txt);
	font-size: 0.9rem; font-family: inherit; transition: all 0.2s; outline: none;
}
input::placeholder, textarea::placeholder { color: var(--mut); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,165,233,0.12); }
select { cursor: pointer; appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem;
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--bdr); }
th { color: var(--mut); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover td { background: rgba(255,255,255,0.015); }

/* Badges */
.badge {
	display: inline-flex; align-items: center; padding: 0.25rem 0.7rem;
	background: rgba(14,165,233,0.12); border: 1px solid rgba(14,165,233,0.18);
	border-radius: var(--radius-pill); font-size: 0.8rem; color: var(--accent);
	font-weight: 600; letter-spacing: 0.01em;
}
.badge-success { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.18); color: var(--success); }
.badge-danger { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.18); color: var(--danger); }

/* Modal */
.modal {
	position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
	background: var(--card); padding: 2rem; border-radius: var(--radius);
	border: 1px solid var(--bdr); z-index: 200; width: 90%; max-width: 520px; box-shadow: var(--shadow-lg);
}
.modal input, .modal textarea, .modal select { margin-bottom: 0.75rem; }

/* Pre / Code */
pre {
	background: var(--input); border: 1px solid var(--bdr); border-radius: var(--radius-sm);
	padding: 1rem 1.25rem; overflow-x: auto; margin: 0.5rem 0; font-size: 0.85rem;
	font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace; color: var(--txt); line-height: 1.6;
}

/* Post Preview */
.post-preview { margin: 1rem 0; padding: 1.25rem 1.5rem; background: var(--card); border: 1px solid var(--bdr); border-radius: var(--radius); transition: all 0.2s; }
.post-preview:hover { border-color: rgba(14,165,233,0.25); }
.post-preview h3 { margin-bottom: 0.25rem; }
.post-preview .meta { color: var(--mut); font-size: 0.82rem; margin-bottom: 0.5rem; }
.posts-list, .docs-list { margin: 1rem 0; }
.docs-list { list-style: none; }
.docs-list li { margin: 0.4rem 0; padding: 0.35rem 0; }

/* Playground */
.playground-controls { display: flex; gap: 0.5rem; margin: 1rem 0; align-items: center; }
.playground-controls select { width: auto; min-width: 120px; }
.playground-body h3, .playground-response h3 { margin: 1rem 0 0.5rem; font-size: 0.95rem; color: var(--sec); }

/* Footer */
.footer {
	background: var(--surf); border-top: 1px solid var(--bdr); padding: 1.5rem 0;
	text-align: center; color: var(--mut); font-size: 0.83rem; margin-top: 3rem; box-shadow: 0 -1px 20px rgba(0,0,0,0.2);
}

/* Project Detail */
.project-detail .content { margin: 1.5rem 0; line-height: 1.7; }
.project-detail .badge { margin-bottom: 1rem; }

/* Scroll Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.15s; }
.reveal:nth-child(4) { transition-delay: 0.2s; }

/* Sign-In Page — Full Dedicated Page */
.signin-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 1.5rem 4rem;
	min-height: calc(100vh - 72px);
	overflow: hidden;
	background: linear-gradient(135deg, #0B0E11 0%, #131A23 25%, #1A2940 45%, #131A23 70%, #0B0E11 100%);
	background-size: 300% 300%;
	animation: gradientShift 10s ease infinite;
}

.signin-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at 20% 30%, rgba(14,165,233,0.08) 0%, transparent 50%),
		radial-gradient(ellipse at 80% 70%, rgba(56,189,248,0.06) 0%, transparent 50%);
	pointer-events: none;
}

.signin-orbs {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.4;
}

.orb-1 {
	width: 400px; height: 400px;
	background: rgba(14,165,233,0.12);
	top: -120px; right: -80px;
	animation: orbFloat 8s ease-in-out infinite;
}

.orb-2 {
	width: 300px; height: 300px;
	background: rgba(139,92,246,0.08);
	bottom: -60px; left: 10%;
	animation: orbFloat 6s ease-in-out infinite 2s;
}

.orb-3 {
	width: 200px; height: 200px;
	background: rgba(6,182,212,0.06);
	top: 40%; left: -40px;
	animation: orbFloat 7s ease-in-out infinite 4s;
}

@keyframes orbFloat {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(30px, -20px) scale(1.05); }
	66% { transform: translate(-20px, 15px) scale(0.95); }
}

.signin-container {
	position: relative;
	width: 100%;
	max-width: 1060px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 3.5rem;
	z-index: 1;
}

/* Left: Brand Section */
.signin-brand {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.signin-logo-wrap svg {
	width: 52px;
	height: 52px;
	stroke: var(--accent);
	filter: drop-shadow(0 0 20px var(--accent-glow));
}

.signin-title {
	font-size: clamp(2rem, 4vw, 2.8rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.1;
	margin: 0;
}

.signin-tagline {
	color: var(--sec);
	font-size: 1rem;
	line-height: 1.6;
	margin: 0;
	max-width: 440px;
}

.signin-features {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	margin-top: 0.5rem;
}

.signin-feature {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--sec);
	font-size: 0.9rem;
}

.signin-feature svg {
	width: 20px;
	height: 20px;
	stroke: var(--accent);
	flex-shrink: 0;
}

/* Right: Form Card */
.signin-form-col {
	display: flex;
	justify-content: center;
}

.signin-card {
	width: 100%;
	max-width: 400px;
	background: rgba(30,35,41,0.7);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 14px;
	padding: 2.25rem 2rem;
	box-shadow:
		0 8px 40px rgba(0,0,0,0.5),
		0 0 0 1px rgba(255,255,255,0.04) inset;
}

.signin-card-header {
	margin-bottom: 1.75rem;
	text-align: center;
}

.signin-card-header h2 {
	font-size: 1.4rem;
	font-weight: 700;
	margin: 0 0 0.35rem;
}

.signin-card-header p {
	color: var(--sec);
	font-size: 0.9rem;
	margin: 0;
}

.signin-btn {
	width: 100%;
	justify-content: center;
	margin-top: 0.25rem;
	padding: 0.65rem 1.35rem;
}

/* Auth form inside sign-in card */
.signin-card .form-group {
	margin-bottom: 1.1rem;
}

.signin-card .form-group label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--sec);
	font-size: 0.85rem;
	font-weight: 500;
}

.signin-card input {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 8px;
	background: rgba(42,48,57,0.8);
	color: var(--txt);
	font-size: 0.9rem;
	font-family: inherit;
	transition: all 0.2s;
	outline: none;
}

.signin-card input::placeholder {
	color: var(--mut);
}

.signin-card input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}

/* Responsive */
@media (max-width: 768px) {
	.signin-container {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
	.signin-brand {
		text-align: center;
		align-items: center;
	}
	.signin-tagline {
		max-width: 100%;
	}
	.signin-features {
		display: none;
	}
	.signin-card {
		max-width: 100%;
	}
	.signin-hero {
		padding: 2rem 1rem 3rem;
		min-height: auto;
	}
	.orb-1, .orb-2, .orb-3 {
		opacity: 0.2;
	}
}

@media (max-width: 480px) {
	.signin-card {
		padding: 1.75rem 1.25rem;
	}
	.signin-title {
		font-size: 1.6rem;
	}
}

/* Legacy auth styles (kept for backward compat) */
.auth-form .btn {
	width: 100%;
	justify-content: center;
	margin-top: 0.5rem;
}

.error-msg {
	color: var(--danger);
	font-size: 0.85rem;
	margin-top: 0.75rem;
	text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
	h1 { font-size: 1.6rem; }
	h2 { font-size: 1.25rem; }
	.hero { padding: 3rem 1rem 2.5rem; margin: 1.5rem 0; }
	.container { padding: 0 1rem; }
	.grid, .grid-3 { grid-template-columns: 1fr; }
	.nav-inner { padding: 0 1rem; }
	.playground-controls { flex-wrap: wrap; }
	.modal { width: 95%; padding: 1.5rem; }
	table { font-size: 0.85rem; }
	th, td { padding: 0.5rem 0.6rem; }
}

@media (max-width: 480px) {
}
