/* ═══════════════════════════════════════════════════════════════════
   VarAtlas Topluluk — Design System (Minimal, varatlas stili)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Font Faces ─────────────────────────────────────────────────── */
@font-face {
	font-family: 'SF Pro Display';
	src: url('./fonts/SFProDisplay-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'SF Pro Display';
	src: url('./fonts/SFProDisplay-Medium.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'SF Pro Display';
	src: url('./fonts/SFProDisplay-Bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'SF Pro Display';
	src: url('./fonts/SFProDisplay-Black.woff2') format('woff2');
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'SF Pro Rounded';
	src: url('./fonts/SFProRounded-Bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* ── Tokens — Light ─────────────────────────────────────────────── */
:root {
	--accent: #3074ae;
	--accent-hover: #215988;
	--accent-light: #eff6ff;

	--bg: #ffffff;
	--surface: #ffffff;
	--border: #dcdcdc;
	--border-focus: #3074ae;

	--text: #1a1a1a;
	--text-muted: #666666;
	--text-faint: #aaaaaa;

	--error: #c0392b;
	--error-bg: #fdf0ef;
	--success: #2e7d32;

	--navbar-bg: #ffffff;
	--navbar-border: #e8e8e8;
	--navbar-h: 60px;

	--radius: 6px;
	--radius-lg: 10px;
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
	--tr: 0.18s ease;
}

/* ── Dark Tema ───────────────────────────────────────────────────── */
[data-theme="dark"] {
	--bg: #000000;
	--surface: #000000;
	--border: #2a2a2a;
	--border-focus: #60a5fa;

	--text: #f0f0f0;
	--text-muted: #888888;
	--text-faint: #444444;

	--navbar-bg: #000000;
	--navbar-border: #1e1e1e;

	--accent: #4a9fd4;
	--accent-hover: #3b89ba;
	--accent-light: rgba(74, 159, 212, 0.12);
}

/* ── Reset ───────────────────────────────────────────────────────── */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}

html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}

html,
body {
	overflow-x: hidden;
}

body {
	font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	transition: background-color 0.25s ease, color 0.25s ease;
	line-height: 1.5;
}

/* ── Navbar ─────────────────────────────────────────────────────── */
.navbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--navbar-h);
	background: var(--navbar-bg);
	border-bottom: 1px solid var(--navbar-border);
	display: flex;
	align-items: center;
	z-index: 100;
}

.navbar-container {
	width: 100%;
	max-width: 960px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.navbar-brand {
	font-family: 'SF Pro Rounded', sans-serif;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.4px;
	line-height: 1;
	height: 32px;
}

.logo-text-red {
	color: #e53935;
}

.logo-text-blue {
	color: var(--accent);
	font-weight: 600;
}

.navbar-actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

/* ── Tema butonu — sınır yok, sadece ikon ───────────────────────── */
.btn-theme {
	background: none;
	border: none;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--text-muted);
	transition: color var(--tr);
}

@media (hover: hover) {
	.btn-theme:hover {
		color: var(--text);
	}
}

.theme-icon-sun,
.theme-icon-moon {
	display: none;
}

:root .theme-icon-sun {
	display: block;
}

[data-theme="dark"] .theme-icon-sun {
	display: none;
}

[data-theme="dark"] .theme-icon-moon {
	display: block;
}

/* ── Profil butonu — sınır yok, ikon link ────────────────────────── */
.btn-profile-icon {
	background: none;
	border: none;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-muted);
	cursor: pointer;
	transition: color var(--tr);
	text-decoration: none;
}

@media (hover: hover) {
	.btn-profile-icon:hover {
		color: var(--text);
	}
}

/* ── Çıkış butonu — sınır yok, text link ────────────────────────── */
.btn-signout {
	background: none;
	border: none;
	padding: 0;
	height: 32px;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-muted);
	cursor: pointer;
	font-family: inherit;
	transition: color var(--tr);
}

@media (hover: hover) {
	.btn-signout:hover {
		color: var(--error);
	}
}

/* ── Layout ──────────────────────────────────────────────────────── */
.page {
	padding-top: calc(var(--navbar-h) + 15px);
	padding-bottom: 80px;
	min-height: 100vh;
}

.wrap {
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	padding: 0 16px;
}

/* ── Unified Search Bar ─────────────────────────────────────────── */
.search-bar-unified {
	display: flex;
	align-items: center;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 15px;
	padding: 4px 6px;
	margin-top: 16px;
	transition: border-color var(--tr), box-shadow var(--tr);
}

.search-bar-unified:focus-within {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-light);
}

.search-icon {
	color: var(--text-faint);
	margin-right: 14px;
	display: flex;
	align-items: center;
}

.search-bar-unified .input-wrap {
	flex: 1;
	position: relative;
}

.search-section {
	margin-top: 32px;
}

.search-results {
	margin-top: 24px;
}

.search-result-card {
	padding: 12px;
	margin-bottom: 0;
	background-color: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.social-link-twitter {
	color: #1DA1F2;
	margin-right: 8px;
}

.social-link-instagram {
	color: #E1306C;
}

.search-input {
	width: 100%;
	background: transparent;
	border: none;
	padding: 10px 14px;
	font-size: 14px;
	color: var(--text);
	font-family: inherit;
	outline: none;
}

.search-input:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.search-input::placeholder {
	color: var(--text-faint);
}

.search-divider {
	width: 1px;
	height: 24px;
	background: var(--border);
	margin: 0 4px;
}

.autocomplete-list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	margin-top: 8px;
	max-height: 200px;
	overflow-y: auto;
	z-index: 100;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	display: none;
}

.autocomplete-item {
	padding: 10px 14px;
	font-size: 13px;
	color: var(--text);
	cursor: pointer;
	transition: background var(--tr);
}

.autocomplete-item:hover {
	background: var(--border);
}

.search-bar-unified .btn-search-icon {
	background: var(--accent);
	color: #fff;
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color var(--tr);
	margin-left: 4px;
}

.search-bar-unified .btn-search-icon:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.search-bar-unified .btn-search-icon:hover:not(:disabled) {
	background: var(--accent-hover);
}

/* ── Utility ─────────────────────────────────────────────────────── */
.hidden {
	display: none !important;
}

.flex-1 {
	flex: 1;
}

.skeleton-badge-home {
	height: 18px;
	width: 60px;
	margin-top: 5px;
}

.skeleton-badge-profile {
	height: 18px;
	width: 60px;
	margin-top: 6px;
}

.border-none {
	border: none !important;
}

.font-normal-faint {
	font-weight: 400;
	color: var(--text-faint);
}

.color-twitter {
	color: #1DA1F2;
}

.color-instagram {
	color: #E1306C;
}

.pl-32 {
	padding-left: 32px;
}

.social-container {
	display: flex;
	gap: 12px;
	margin-top: 16px;
}

/* ── Skeleton Loading ────────────────────────────────────────────── */
@keyframes skeleton-shimmer {
	0% {
		background-position: -200% 0;
	}

	100% {
		background-position: 200% 0;
	}
}

.skeleton {
	background: linear-gradient(90deg, var(--border) 25%, var(--surface) 50%, var(--border) 75%);
	background-size: 200% 100%;
	animation: skeleton-shimmer 1.5s infinite linear;
	border-radius: 4px;
	opacity: 0.7;
}

[data-theme="dark"] .skeleton {
	background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
	background-size: 200% 100%;
}

.skeleton-text {
	height: 14px;
	margin-bottom: 8px;
	width: 100%;
}

.skeleton-text.short {
	width: 40%;
}

.skeleton-text.medium {
	width: 70%;
}

.skeleton-avatar {
	width: 60px;
	height: 60px;
	border-radius: var(--radius);
	flex-shrink: 0;
}

.skeleton-btn {
	height: 32px;
	width: 100px;
	border-radius: 99px;
}

/* ════════════════════════════════════════════════════════════════════
   ANA SAYFA
════════════════════════════════════════════════════════════════════ */

/* Misafir hero */
.hero {
	text-align: center;
	padding: 40px 0;
}

.hero-title {
	font-family: 'SF Pro Rounded', sans-serif;
	font-size: 26px;
	font-weight: 900;
	letter-spacing: -0.5px;
	color: var(--text);
	margin-bottom: 10px;
	line-height: 1.25;
}

.hero-desc {
	font-size: 14px;
	color: var(--text-muted);
	line-height: 1.6;
	margin-bottom: 28px;
}

.btn-google {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 20px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
	cursor: pointer;
	font-family: inherit;
	transition: border-color var(--tr);
	text-decoration: none;
}

.btn-google svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

@media (hover: hover) {
	.btn-google:hover {
		border-color: var(--accent);
	}
}

/* Giriş yapılmış — ana sayfa */
.home-user {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 0;
	margin-bottom: 24px;
}

.home-avatar {
	width: 60px;
	height: 60px;
	border-radius: var(--radius);
	object-fit: contain;
	background: transparent;
	border: none;
	flex-shrink: 0;
}

.home-info {
	flex: 1;
	min-width: 0;
}

.home-username {
	font-weight: 700;
	font-size: 15px;
	color: var(--text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.home-uni {
	font-size: 13px;
	color: var(--text-muted);
	margin-top: 1px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.home-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 4px;
	margin-top: 5px;
}

.home-badge--ogrenci {
	background: var(--accent-light);
	color: var(--accent);
}

.home-badge--aday {
	background: #f0fdf4;
	color: var(--success);
}

[data-theme="dark"] .home-badge--aday {
	background: rgba(46, 125, 50, 0.15);
}

.btn-profile {
	font-size: 13px;
	font-weight: 600;
	color: #ffffff;
	background: var(--accent);
	padding: 8px 16px;
	border-radius: 99px;
	text-decoration: none;
	flex-shrink: 0;
	transition: background-color var(--tr);
	white-space: nowrap;
}

@media (hover: hover) {
	.btn-profile:hover {
		background: var(--accent-hover);
		color: #ffffff;
	}
}

/* ════════════════════════════════════════════════════════════════════
   KURULUM FORMU (profile.html)
════════════════════════════════════════════════════════════════════ */

.setup-title {
	font-family: 'SF Pro Rounded', sans-serif;
	font-size: 22px;
	font-weight: 900;
	letter-spacing: -0.5px;
	color: var(--text);
	margin-bottom: 4px;
}

.setup-subtitle {
	font-size: 14px;
	color: var(--text-muted);
	margin-bottom: 28px;
}

/* İlerleme çubuğu */
.progress-track {
	height: 3px;
	background: var(--border);
	border-radius: 99px;
	margin-bottom: 32px;
	overflow: hidden;
}

.progress-bar {
	height: 100%;
	background: var(--accent);
	border-radius: 99px;
	transition: width 0.3s ease;
	width: 33%;
}

/* Adım */
.step {
	display: none;
}

.step.active {
	display: block;
}

/* Tip seçimi — sadece 2 buton yan yana, kutu yok */
.type-btns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 8px;
}

.type-btn {
	padding: 14px 12px;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--surface);
	cursor: pointer;
	font-family: inherit;
	text-align: left;
	transition: border-color var(--tr);
}

.type-btn .type-label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: var(--text);
	margin-bottom: 3px;
}

.type-btn .type-desc {
	display: block;
	font-size: 12px;
	color: var(--text-muted);
	line-height: 1.4;
}

@media (hover: hover) {
	.type-btn:hover {
		border-color: var(--accent);
	}
}

.type-btn.selected {
	border-color: var(--accent);
	background: var(--accent-light);
}

.type-btn.selected .type-label {
	color: var(--accent);
}

/* Form elemanları */
.form-group {
	margin-bottom: 18px;
}

.form-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-muted);
	margin-bottom: 6px;
}

.form-select,
.form-input,
.form-textarea {
	width: 100%;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 9px 12px;
	font-size: 14px;
	color: var(--text);
	font-family: inherit;
	outline: none;
	transition: border-color var(--tr);
	-webkit-appearance: none;
	appearance: none;
	margin-bottom: 5px;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
	border-color: var(--border-focus);
}

.form-select:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Select ok */
.select-wrap {
	position: relative;
}

.select-wrap::after {
	content: '';
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid var(--text-faint);
	pointer-events: none;
}

/* Input Prefix (İkonlu inputlar) */
.input-prefix-wrap {
	position: relative;
}

.input-prefix {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	pointer-events: none;
}

.input-prefix svg {
	width: 16px;
	height: 16px;
}

.form-textarea {
	resize: none;
	min-height: 80px;
	line-height: 1.5;
}

/* Input @ prefix */
.input-prefix-wrap {
	position: relative;
}

.input-prefix {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	color: var(--text-faint);
	pointer-events: none;
}

.input-prefix-wrap .form-input {
	padding-left: 30px;
}

/* Helper metinler */
.form-hint {
	font-size: 12px;
	color: var(--text-faint);
	margin-top: 4px;
}

.form-error {
	font-size: 12px;
	color: var(--error);
	margin-top: 4px;
}

.form-ok {
	font-size: 12px;
	color: var(--success);
	margin-top: 4px;
}

.char-count {
	font-size: 12px;
	color: var(--text-faint);
	text-align: right;
	margin-top: 3px;
}

/* Butonlar */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 18px;
	border-radius: var(--radius);
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	border: none;
	transition: all var(--tr);
	text-decoration: none;
}

.btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

.btn-primary {
	background: var(--accent);
	color: #fff;
}

@media (hover: hover) {
	.btn-primary:hover {
		background: var(--accent-hover);
	}
}

.btn-ghost {
	background: none;
	color: var(--text-muted);
	border: 1px solid var(--border);
}

@media (hover: hover) {
	.btn-ghost:hover {
		border-color: var(--text-muted);
		color: var(--text);
	}
}

.btn-full {
	width: 100%;
}

.step-nav {
	display: flex;
	gap: 8px;
	margin-top: 24px;
}

.step-nav .btn-ghost {
	flex: none;
}

.step-nav .btn-primary {
	flex: 1;
}

/* ════════════════════════════════════════════════════════════════════
   PROFİL GÖRÜNTÜLEME
════════════════════════════════════════════════════════════════════ */

.profile-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.profile-avatar {
	width: 60px;
	height: 60px;
	border-radius: var(--radius);
	object-fit: contain;
	background: transparent;
	border: none;
	flex-shrink: 0;
}

.profile-name {
	font-family: 'SF Pro Rounded', sans-serif;
	font-size: 20px;
	font-weight: 700;
	color: var(--text);
	letter-spacing: -0.3px;
}

.profile-email {
	font-size: 13px;
	color: var(--text-muted);
	margin-top: 2px;
}

.profile-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 4px;
	margin-top: 6px;
}

.profile-badge--ogrenci {
	background: var(--accent-light);
	color: var(--accent);
}

.profile-badge--aday {
	background: #f0fdf4;
	color: var(--success);
}

[data-theme="dark"] .profile-badge--aday {
	background: rgba(46, 125, 50, 0.15);
}

/* Detay satırları — kutu yok, sadece listeler */
.profile-row {
	display: flex;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid var(--border);
	align-items: baseline;
}

.profile-row:last-child {
	border-bottom: none;
}

.profile-key {
	font-size: 12px;
	font-weight: 600;
	color: var(--text-faint);
	text-transform: uppercase;
	letter-spacing: 0.4px;
	min-width: 80px;
	flex-shrink: 0;
}

.profile-val {
	font-size: 14px;
	color: var(--text);
	flex: 1;
	line-height: 1.4;
}

.profile-bio {
	margin-top: 16px;
	font-size: 14px;
	color: var(--text-muted);
	line-height: 1.6;
}

.btn-social {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: var(--radius);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid var(--border);
	color: var(--text);
	transition: all var(--tr);
}

.btn-social svg {
	flex-shrink: 0;
}

.btn-social-twitter:hover {
	border-color: #1DA1F2;
	color: #1DA1F2;
}

.btn-social-instagram:hover {
	border-color: #E1306C;
	color: #E1306C;
}

.profile-actions {
	display: flex;
	gap: 8px;
	margin-top: 24px;
}

/* Edit section */
.edit-divider {
	border: none;
	border-top: 1px solid var(--border);
	margin: 20px 0;
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.hero-title {
		font-size: 24px;
	}

	.type-btns {
		grid-template-columns: 1fr;
	}

	.profile-header {
		flex-wrap: wrap;
	}

	.profile-actions {
		flex-direction: column;
	}
}