/* Modern enhancements, dark mode, accessibility, and dialog styles for /giris/ */

:root {
	color-scheme: light dark;
	--fg-accent: #78cc6d;
	--fg-accent-hover: #64b859;
	--fg-surface: light-dark(#ffffff, #31313a);
	--fg-surface-muted: light-dark(#f6f7f9, #26262d);
	--fg-bg-body: light-dark(#50a3a2, #26262d);
	--fg-text: light-dark(#646464, rgba(255, 255, 255, 0.72));
	--fg-heading: light-dark(#323232, rgba(255, 255, 255, 0.92));
	--fg-subtle: light-dark(#666666, rgba(255, 255, 255, 0.65));
	--fg-border: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.12));
	--fg-shadow: light-dark(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.45));
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) {
	color-scheme: dark;
}

:root:has(> head > meta[name="color-scheme"][content="light"]) {
	color-scheme: light;
}

/* Base surfaces & typography mapped to light-dark() */
body {
	color: var(--fg-text);
	background-color: var(--fg-bg-body);
}

.background.gradient {
	background: light-dark(
		linear-gradient(to bottom right, #50a3a2 0%, #78cc6d 100%),
		linear-gradient(to bottom right, #1f2229 0%, #2b333a 100%)
	);
}

.header,
.header .top-menu,
.header .top-menu ul li a,
.card-started:before,
.card-started .profile,
.card-inner,
.card-inner:before,
.card-inner:after {
	background: var(--fg-surface);
}

.card-started .profile .slide:before,
.card-started .profile .slide:after {
	background: var(--fg-surface);
	z-index: 2;
}

/* LCP profile image inside .slide */
.card-started .profile .slide {
	overflow: hidden;
}

.card-started .profile .slide picture,
.card-started .profile .slide img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	z-index: 1;
}

/* Hide source strings for typing animation immediately (prevents stacked text) */
.subtitle-typed .typing-title {
	display: none;
}

/* Preserve new-skin.css margin-top: 240px on .profile.no-photo .title */
.card-started .profile h1.title {
	font-size: 34px;
	color: var(--fg-heading);
	line-height: 32px;
	font-weight: 400;
	margin-bottom: 10px;
}

.content h2.title {
	color: var(--fg-heading);
}

.header .profile .title,
.header .top-menu ul li a,
.header .top-menu ul li a .icon,
.header .top-menu ul li a .link,
.service-items .service-item .name,
.fuct-items .fuct-item .name,
.revs-item .info .name,
.card-started .profile .social a .fa,
.card-started .profile .social a .fab,
.card-started .profile .social a .fas,
.card-started .profile .social a .fa-brands {
	color: var(--fg-heading);
}

.revs-item .text,
.revs-item .info .company,
.service-items .service-item .desc,
.text-box p,
.info-list ul li,
.client-items .client-item .image {
	color: var(--fg-text);
}

.client-items .client-item a {
	color: var(--fg-heading);
}

.client-items .client-item a:hover,
.fuct-items .fuct-item .name a:hover {
	color: var(--fg-accent);
}

.client-items .client-item img {
	width: 92px;
	height: 92px;
	object-fit: contain;
}

.revs-item .user .img img {
	width: 60px;
	height: 60px;
	object-fit: cover;
}

.revs-item .text blockquote {
	margin: 0;
	padding: 0;
	border: 0;
}

/* Subtle dark-mode divider lines */
@media (prefers-color-scheme: dark) {
	:root:not(:has(> head > meta[name="color-scheme"][content="light"])) .border-line-v:before {
		background: radial-gradient(ellipse at top, rgba(197, 202, 213, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
	}
	:root:not(:has(> head > meta[name="color-scheme"][content="light"])) .border-line-h:after,
	:root:not(:has(> head > meta[name="color-scheme"][content="light"])) .content .title:after,
	:root:not(:has(> head > meta[name="color-scheme"][content="light"])) .header .top-menu ul li a:before {
		background: radial-gradient(ellipse at left, rgba(197, 202, 213, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
	}
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .border-line-v:before {
	background: radial-gradient(ellipse at top, rgba(197, 202, 213, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .border-line-h:after,
:root:has(> head > meta[name="color-scheme"][content="dark"]) .content .title:after,
:root:has(> head > meta[name="color-scheme"][content="dark"]) .header .top-menu ul li a:before {
	background: radial-gradient(ellipse at left, rgba(197, 202, 213, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
}

/* Visually hidden helper for screen readers */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Theme toggle button inside .top-menu */
.header .top-menu ul li .theme-toggle {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	padding: 13px 3px;
	margin: 0;
	border: 0;
	background: transparent;
	text-align: center;
	color: var(--fg-heading);
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	cursor: pointer;
	line-height: 1.4;
}

.header .top-menu ul li .theme-toggle:before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 1px;
	background: radial-gradient(ellipse at right, #dddddd 0%, rgba(255, 255, 255, 0) 70%);
}

.header .top-menu ul li .theme-toggle .icon {
	margin: 0 auto;
	display: block;
	font-size: 18px;
	line-height: 26px;
	color: var(--fg-heading);
	transition: color 0.25s ease;
}

.header .top-menu ul li .theme-toggle .link {
	display: block;
	font-size: 11px;
	font-weight: 500;
	line-height: 13px;
	color: var(--fg-heading);
	transition: color 0.25s ease;
}

.header .top-menu ul li .theme-toggle:hover .icon,
.header .top-menu ul li .theme-toggle:hover .link {
	color: var(--fg-accent);
}

/* Pure-CSS state branching for toggle icon/label (no JS class needed) */
.theme-toggle .theme-option-light {
	display: none;
}

.theme-toggle .theme-option-dark {
	display: block;
}

@media (prefers-color-scheme: dark) {
	:root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-toggle .theme-option-dark {
		display: none;
	}
	:root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-toggle .theme-option-light {
		display: block;
	}
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .theme-option-dark {
	display: none;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .theme-option-light {
	display: block;
}

@media (max-width: 1199px) {
	.header .top-menu ul li .theme-toggle:before {
		top: 0;
		left: 0;
		width: 1px;
		height: 100%;
		background: radial-gradient(ellipse at top, #dddddd 0%, rgba(255, 255, 255, 0) 70%);
	}
}

/* Certificate note & native <dialog> */
.cert-note {
	margin: 0 0 18px 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--fg-subtle);
}

.cert-dialog {
	max-width: 440px;
	width: calc(100% - 32px);
	padding: 24px;
	border: 1px solid var(--fg-border);
	border-radius: 10px;
	background: var(--fg-surface);
	color: var(--fg-text);
	box-shadow: 0 18px 45px var(--fg-shadow);
	font-family: 'Poppins', sans-serif;
	margin: auto;
}

.cert-dialog::backdrop {
	background-color: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(3px);
}

.cert-dialog__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.cert-dialog__title {
	margin: 0;
	font-size: 17px;
	line-height: 1.35;
	font-weight: 600;
	color: var(--fg-heading);
}

.cert-dialog__close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--fg-subtle);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.cert-dialog__close:hover {
	background: var(--fg-surface-muted);
	color: var(--fg-heading);
}

.cert-dialog__body {
	margin: 0 0 20px 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--fg-text);
}

.cert-dialog__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

.cert-dialog__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 16px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cert-dialog__btn--primary {
	background: var(--fg-accent);
	color: #162414;
	border: 1px solid transparent;
}

.cert-dialog__btn--primary:hover {
	background: var(--fg-accent-hover);
	color: #162414;
}

.cert-dialog__btn--secondary {
	background: var(--fg-surface-muted);
	color: var(--fg-heading);
	border: 1px solid var(--fg-border);
}

.cert-dialog__btn--secondary:hover {
	border-color: var(--fg-accent);
	color: var(--fg-accent);
}

/* Keyboard focus visibility */
a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--fg-accent);
	outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.bg-bubbles li {
		animation: none !important;
	}
	.typed-cursor {
		animation: none !important;
		display: none;
	}
	*, *::before, *::after {
		transition-duration: 0.01ms !important;
	}
}
