/* === ÃËÎÁÀËÜÍÛÅ ÏÅÐÅÌÅÍÍÛÅ È ÑÁÐÎÑ === */
:root {
	--primary: #1e40af;
	--primary-light: #3b82f6;
	--primary-dark: #1e3a8a;
	--text-main: #1f2937;
	--text-light: #f9fafb;
	--border: #e5e7eb;
	--shadow: 0 4px 20px rgba(0,0,0,0.08);
	--transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	line-height: 1.7;
	color: var(--text-main);
	background: linear-gradient(135deg, #f0f4ff, #e6e9ff);
	background-image:
		radial-gradient(circle at 10% 20%, rgba(30, 64, 175, 0.03) 1px, transparent 1px),
		radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.02) 1px, transparent 1px);
	min-height: 100vh;
}

a {
	color: var(--primary);
	text-decoration: none;
	transition: var(--transition);
}
a:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

/* === ÂÅÐÕÍÈÉ ÁËÎÊ: ÄÎÍÍÒÓ — ÑÏÐÀÂÀ ÂÂÅÐÕÓ === */
#topblock {
	background: linear-gradient(135deg, #0f172a, #1e3a8a); /* Êàê ó øàïêè */
	padding: 10px 24px;
	text-align: right;
	border-bottom: none; /* Óáèðàåì íèæíþþ ãðàíèöó, åñëè íå íóæíà */
}
#donntu a {
	display: inline-block;
	color: #333;
	background: #f1f5f9;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	margin-left: 12px;
	transition: var(--transition);
}
#donntu a:hover {
	background: #e2e8f0;
	transform: translateY(-1px);
	text-decoration: none;
}

/* === ØÀÏÊÀ (HEADER) — ÎÒÄÅËÜÍÛÉ ÔÎÍ === */
#header {
	display: flex;
	align-items: flex-start;
	gap: 36px;
	padding: 48px 24px;
	/* Ò¸ìíî-ñèíèé ãðàäèåíò äëÿ øàïêè */
	background: linear-gradient(135deg, #0f172a, #1e3a8a);
	color: white;
	border-bottom: none;
}
#header a {
	color: #60a5fa;
}
#header a:hover {
	color: #93c5fd;
	text-decoration: underline;
}
#photomag img {
	width: 180px;
	height: 240px;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.3);
	object-fit: cover;
	border: 3px solid rgba(255,255,255,0.15);
}
#headertext .hdr {
	margin: 10px 0;
	color: white;
	line-height: 1.4;
}
#headertext h1.hdr {
	font-size: 2.0rem;
	font-weight: 800;
	margin-top: 0;
}

/* === ÌÅÍÞ — ÊÍÎÏÊÈ Ñ ÃÐÀÄÈÅÍÒÎÌ È ÀÍÈÌÀÖÈÅÉ ÇÀÏÎËÍÅÍÈß === */
#menu {
	padding: 20px 0;
	background: white;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 32px;
	border-bottom: 1px solid rgba(30, 64, 175, 0.2); /* Òîíêàÿ, ïîëóïðîçðà÷íàÿ ëèíèÿ */
	position: relative;
}

a.button,
a.mitemb {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 1.05rem;
	color: white;
	text-decoration: none;
	overflow: hidden;
	border-radius: 12px;
	padding: 14px 28px;
	transition: var(--transition);
	z-index: 1;
	box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

a.button::before,
a.mitemb::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--primary), var(--primary-light), #60a5fa);
	z-index: -2;
	border-radius: 12px;
}

a.button::after,
a.mitemb::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 0%;
	height: 100%;
	background: linear-gradient(135deg, #0f172a, #1e293b);
	z-index: -1;
	border-radius: 12px;
	transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

a.button:hover::after,
a.mitemb:hover::after {
	width: 100%;
}

a.button:hover,
a.mitemb:hover {
	color: white;
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(30, 64, 175, 0.4);
	text-decoration: none;
}

/* Àêòèâíàÿ âêëàäêà — óæå çàïîëíåíà */
a.button.colorfix {
	color: white !important;
	box-shadow: 0 6px 18px rgba(30, 64, 175, 0.35) !important;
}
a.button.colorfix::after {
	width: 100% !important;
	background: linear-gradient(135deg, #0f172a, #1e293b) !important;
}

/* === ÎÑÍÎÂÍÎÉ ÊÎÍÒÅÍÒ === */
#artic header{
    margin-bottom: 1rem;
    display: block;
    text-align: center;
}
#artic main {
    text-align: justify;
    margin: 0px 3%;
}
#middleblock {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	position: relative;
}
#maintext {
	max-width: 1015px;
	margin: 0 auto;
	padding: 48px 36px;
	background: white;
	border-radius: 16px;
	box-shadow: var(--shadow);
	position: relative;
	z-index: 2;
}
#maintext h1 {
	color: #0f172a;
	font-size: 1.9rem;
	margin: 24px 0;
	text-align: center;
	font-weight: 500; /* Íå æèðíûé! */
	letter-spacing: -0.02em;
}
#maintext p {
	margin-bottom: 20px;
	font-size: 1.05rem;
	text-align: justify;
	color: #2d3748;
}
#maintext p:last-child {
	margin-bottom: 0;
}
/* === ÒÀÁËÈÖÀ ÐÅÇÞÌÅ === */
#resume {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin-top: 24px;
}
#resume tr {
  border-bottom: 1px solid var(--border-color);
  background: #fafafa;
  transition: var(--transition);
}
#resume tr:hover {
  background: #f3f4f6;
}
#resume .c1 {
  width: 30%;
  font-weight: 600;
  color: var(--text-main);
  padding: 16px 24px;
  vertical-align: top;
  background: white;
}
#resume .c2 {
  padding: 16px 24px;
  color: var(--text-secondary);
}
#resume .c2 ol {
  padding-left: 24px;
  margin: 8px 0;
}
#resume .c2 li {
  margin: 6px 0;
}
/* === ÍÈÆÍÅÅ ÌÅÍÞ === */
#menub {
	display: flex;
	justify-content: center;
	gap: 32px;
	padding: 28px;
	background: white;
	border-top: 1px solid var(--border);
	margin-top: 32px;
	flex-wrap: wrap;
}

/* === ÀÄÀÏÒÈÂÍÎÑÒÜ === */
@media (max-width: 900px) {
	#header {
		flex-direction: column;
		text-align: center;
		gap: 24px;
		padding: 32px 16px;
	}
	#headertext .hdr {
		text-align: center;
	}
	#menu {
		gap: 16px;
		padding: 16px 0;
	}
	a.button,
	a.mitemb {
		padding: 12px 20px;
		font-size: 1rem;
	}
	#maintext {
		padding: 32px 20px;
	}
	#maintext h1 {
		font-size: 1.6rem;
	}
	#menub {
		flex-direction: column;
		align-items: center;
		gap: 12px;
		padding: 20px;
	}
}