/* ===== MUSEUM DARK PORTFOLIO STYLE ===== */

:root {
    --bg: #0b0f1a;
    --bg2: #111827;
    --surface: rgba(200, 169, 106, 0.05);
    --surface-hover: rgba(200, 169, 106, 0.09);
    --accent: #c8a96a;
    --accent2: #2e3a5a;
    --accent3: #9a7a48;
    --text: #ddd8cc;
    --text-muted: #7a7e94;
    --border: rgba(200, 169, 106, 0.18);
    --glow: 0 0 14px rgba(200, 169, 106, 0.18);
    --glow-strong: 0 0 28px rgba(200, 169, 106, 0.28);
    --font-main: 'Orbitron', monospace;
    --font-body: 'Space Grotesk', sans-serif;
    --font-size-base: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: 1.75;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -15%;
    width: 55vw;
    height: 55vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 169, 106, 0.07) 0%, rgba(200, 169, 106, 0.02) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: floatOrb1 25s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 58, 90, 0.14) 0%, rgba(46, 58, 90, 0.04) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: floatOrb2 30s ease-in-out infinite;
}

@keyframes floatOrb1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(8vw, 5vh); }
    66% { transform: translate(-4vw, 8vh); }
}

@keyframes floatOrb2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-6vw, -4vh); }
    66% { transform: translate(5vw, -7vh); }
}

/* ===== CANVAS BACKGROUND ===== */
#canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== UTILITY ===== */
.accent { color: var(--accent); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 1; }

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3rem;
    background: rgba(11, 15, 26, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-logo {
    font-family: var(--font-main);
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 3px;
    text-shadow: 0 0 12px rgba(200, 169, 106, 0.2);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: color 0.3s, text-shadow 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
    text-shadow: var(--glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 25px; height: 2px;
    background: var(--accent);
}

/* ===== HERO ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 3rem;
    position: relative;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 700px;
    height: 700px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(200, 169, 106, 0.08) 0%, rgba(200, 169, 106, 0.02) 40%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1100px;
    width: 100%;
}

.hero-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.hero-avatar {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 2;
    border: 2px solid rgba(200, 169, 106, 0.6);
    filter: drop-shadow(0 0 20px rgba(200, 169, 106, 0.2)) drop-shadow(0 4px 18px rgba(0, 0, 0, 0.6));
}

.avatar-ring {
    position: absolute;
    top: -12px; left: -12px;
    width: calc(100% + 24px);
    height: calc(100% + 24px);
    border-radius: 50%;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #c8a96a, #2e3a5a, #9a7a48) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    animation: spin 12s linear infinite;
    z-index: 1;
    opacity: 0.85;
    filter: drop-shadow(0 0 12px rgba(200, 169, 106, 0.25));
}

@keyframes spin { to { transform: rotate(360deg); } }

.hero-label {
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.hero-name {
    font-family: var(--font-main);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 30px rgba(200, 169, 106, 0.12);
}

.hero-title {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    background: rgba(200, 169, 106, 0.07);
    border: 1px solid rgba(200, 169, 106, 0.25);
    color: var(--accent);
    padding: 0.35rem 1rem;
    border-radius: 4px;
    font-size: 0.82rem;
    letter-spacing: 1px;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.tag:hover {
    background: rgba(200, 169, 106, 0.16);
    border-color: rgba(200, 169, 106, 0.55);
    box-shadow: 0 0 14px rgba(200, 169, 106, 0.15), inset 0 0 10px rgba(200, 169, 106, 0.05);
    transform: translateY(-1px);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent3));
    color: #0b0f1a;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 0 18px rgba(200, 169, 106, 0.15);
    transition: opacity 0.3s, transform 0.2s, box-shadow 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 0 28px rgba(200, 169, 106, 0.3);
}

.btn-outline {
    border: 1px solid rgba(200, 169, 106, 0.5);
    color: var(--accent);
    padding: 0.75rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background 0.3s, border-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.btn-outline:hover {
    background: rgba(200, 169, 106, 0.1);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(200, 169, 106, 0.12);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: fadeInUp 2s ease infinite;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

@keyframes fadeInUp {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(-5px); }
}

/* ===== SECTIONS ===== */
.section {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}

/* Keep media-heavy sections fully paintable to avoid lazy-load paint glitches. */
#artifacts,
#restoration,
#gallery {
    content-visibility: visible;
    contain-intrinsic-size: auto;
}

/* Hero is above-fold — no content-visibility */
.hero-section {
    content-visibility: visible;
}

.section-alt {
    background: rgba(26, 34, 51, 0.4);
    position: relative;
}

.section-alt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(200, 169, 106, 0.15), transparent);
}

.section-alt::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(200, 169, 106, 0.15), transparent);
}

.section-title {
    font-family: var(--font-main);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--accent);
    letter-spacing: 4px;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 20px rgba(200, 169, 106, 0.15);
}

.section-title::after {
    content: '';
    display: block;
    height: 1px;
    width: 100%;
    margin-top: 0.6rem;
    background: linear-gradient(to right, var(--accent), rgba(200, 169, 106, 0.2), transparent);
    box-shadow: 0 0 8px rgba(200, 169, 106, 0.1);
}

/* ===== GLASS CARD ===== */
.glass-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.8rem;
    backdrop-filter: blur(6px);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(200, 169, 106, 0.2), transparent);
    border-radius: 6px 6px 0 0;
    pointer-events: none;
}

.glass-card:hover {
    background: var(--surface-hover);
    border-color: rgba(200, 169, 106, 0.35);
    box-shadow: 0 2px 20px rgba(200, 169, 106, 0.06);
}

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 2rem;
}

.about-card p { margin-bottom: 1rem; color: var(--text-muted); font-size: 1rem; }
.about-card p:last-child { margin-bottom: 0; }

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-content: start;
}

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 22px rgba(200, 169, 106, 0.08);
}

.stat-number {
    font-family: var(--font-main);
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.4rem;
    text-shadow: 0 0 16px rgba(200, 169, 106, 0.2);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    letter-spacing: 1px;
}

/* ===== TIMELINE ===== */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    padding-left: 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, rgba(200, 169, 106, 0.5), transparent);
}

.timeline-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-left: 1.5rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.1rem;
    top: 1.6rem;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(200, 169, 106, 0.4), 0 0 20px rgba(200, 169, 106, 0.15);
}

.timeline-year {
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding-top: 0.1rem;
}

.timeline-content h3 {
    font-family: var(--font-main);
    font-size: 0.95rem;
    letter-spacing: 2px;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.timeline-place {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.timeline-spec {
    color: var(--accent);
    font-size: 0.85rem;
}

/* ===== EXPERIENCE ===== */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.exp-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
}

.active-card {
    border-color: rgba(200, 169, 106, 0.4);
    background: rgba(200, 169, 106, 0.06);
    box-shadow: inset 0 0 40px rgba(200, 169, 106, 0.03);
}

.exp-period {
    font-size: 0.85rem;
    letter-spacing: 1px;
    white-space: nowrap;
    min-width: 220px;
}

.exp-title {
    font-family: var(--font-main);
    font-size: 0.95rem;
    letter-spacing: 2px;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.exp-place {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.badge {
    background: rgba(200, 169, 106, 0.1);
    border: 1px solid rgba(200, 169, 106, 0.4);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.78rem;
    letter-spacing: 1px;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(200, 169, 106, 0.08);
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 10px rgba(200, 169, 106, 0.08); }
    50% { box-shadow: 0 0 18px rgba(200, 169, 106, 0.18); }
}

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 24px rgba(200, 169, 106, 0.08);
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 0.3rem;
    filter: drop-shadow(0 0 6px rgba(200, 169, 106, 0.2));
}

.skill-card h3 {
    font-family: var(--font-main);
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--text);
    text-transform: uppercase;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ===== CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
    padding: 2.5rem 1.5rem;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.contact-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 30px rgba(200, 169, 106, 0.12), 0 0 50px rgba(200, 169, 106, 0.04);
    border-color: rgba(200, 169, 106, 0.45);
}

.contact-block-info {
    cursor: default;
}

.contact-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(200, 169, 106, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: rgba(200, 169, 106, 0.06);
    box-shadow: 0 0 20px rgba(200, 169, 106, 0.08);
    transition: box-shadow 0.3s, background 0.3s;
}

.contact-block:hover .contact-icon {
    box-shadow: 0 0 28px rgba(200, 169, 106, 0.2);
    background: rgba(200, 169, 106, 0.1);
}

.contact-block-label {
    font-family: var(--font-main);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-block-value {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    word-break: break-all;
}

.contact-block-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s;
    letter-spacing: 0.5px;
}

.contact-block:hover .contact-block-hint {
    opacity: 1;
}

.contact-form-wrap {
    margin: 2rem auto 0;
    max-width: 900px;
    padding: 2.2rem;
}

.contact-form-eyebrow {
    color: var(--accent);
    font-family: var(--font-main);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}

.contact-form-title {
    font-family: var(--font-main);
    color: var(--text);
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.contact-form-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.4rem;
    max-width: 720px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-field span {
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.form-field input,
.form-field textarea {
    background: rgba(11, 15, 26, 0.65);
    border: 1px solid rgba(200, 169, 106, 0.22);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.5;
    padding: 0.75rem 0.9rem;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(122, 126, 148, 0.8);
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: rgba(200, 169, 106, 0.55);
    box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.1);
    background: rgba(11, 15, 26, 0.8);
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-submit {
    border: none;
    cursor: pointer;
}

.form-status {
    min-height: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-status.is-success {
    color: #8ad7a7;
}

.form-status.is-error {
    color: #f0a099;
}

/* ===== TELEGRAM BUTTON ===== */
.telegram-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    width: 54px; height: 54px;
    border-radius: 50%;
    background: #1a6fa8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, background 0.3s;
}

.telegram-btn:hover {
    transform: scale(1.1);
    background: #1e88cc;
}

@keyframes pulse-tg {}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 2rem 1.2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    background: rgba(11, 15, 26, 0.6);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(200, 169, 106, 0.2), transparent);
}

.footer-inner {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.footer-main {
    color: var(--text);
    font-size: 0.82rem;
    letter-spacing: 1.2px;
}

.footer-credit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--accent);
    border: 1px solid rgba(200, 169, 106, 0.28);
    border-radius: 999px;
    padding: 0.24rem 0.72rem;
    font-size: 0.68rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    background: rgba(200, 169, 106, 0.05);
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.footer-credit-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(200, 169, 106, 0.45);
}

.footer-credit:hover {
    transform: translateY(-1px);
    border-color: rgba(200, 169, 106, 0.55);
    background: rgba(200, 169, 106, 0.1);
    box-shadow: 0 0 16px rgba(200, 169, 106, 0.15);
}

.footer-sub {
    margin-top: 0.1rem;
    opacity: 0.65;
    font-size: 0.75rem;
}

/* ===== SECTION INTRO ===== */
.section-intro {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    max-width: 700px;
}

/* ===== DIPLOMAS ===== */
.subsection-title {
    font-family: var(--font-main);
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 3rem 0 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.diplomas-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.diploma-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.4rem 1.8rem;
}

.diploma-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

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

.diploma-info h4 {
    font-family: var(--font-main);
    color: var(--accent);
    font-size: 0.88rem;
    letter-spacing: 1.5px;
    margin-bottom: 0.3rem;
}

.diploma-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.3rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.3s, color 0.3s, transform 0.2s;
}

.btn-download:hover {
    background: var(--accent);
    color: var(--bg);
    transform: translateY(-2px);
}

/* ===== ARTIFACTS ===== */
.artifacts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.artifact-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.artifact-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 4px;
    display: block;
    cursor: pointer;
    opacity: 0;
    background: linear-gradient(135deg, rgba(200, 169, 106, 0.08), rgba(46, 58, 90, 0.14));
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s, opacity 0.25s ease;
}

.artifact-photo.is-loaded { opacity: 1; }

.artifact-photo:hover {
    transform: scale(1.04);
    border-color: var(--accent);
    box-shadow: var(--glow);
}

.artifact-caption {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-align: center;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

/* ===== RESTORATION ===== */
.restoration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.restoration-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.3s;
}

.restoration-item:hover {
    border-color: rgba(200, 169, 106, 0.4);
}

.restoration-photo {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    opacity: 0;
    background: linear-gradient(135deg, rgba(200, 169, 106, 0.08), rgba(46, 58, 90, 0.14));
    transition: transform 0.4s, opacity 0.25s ease;
    will-change: transform;
}

.restoration-photo.is-loaded { opacity: 1; }

.restoration-item:hover .restoration-photo {
    transform: scale(1.04);
}

.restoration-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 15, 26, 0.78) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.restoration-item:hover .restoration-overlay {
    opacity: 1;
}

.restoration-overlay span {
    color: var(--accent);
    font-family: var(--font-main);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.gallery-item--featured {
    grid-column: span 4;
    grid-row: span 1;
}

.gallery-item:hover {
    border-color: rgba(200, 169, 106, 0.45);
    box-shadow: var(--glow);
}

.gallery-photo {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    opacity: 0;
    background: linear-gradient(135deg, rgba(200, 169, 106, 0.08), rgba(46, 58, 90, 0.14));
    transition: transform 0.45s ease, opacity 0.25s ease;
    will-change: transform;
}

.gallery-photo.is-loaded { opacity: 1; }

.artifact-photo.is-error,
.restoration-photo.is-error,
.gallery-photo.is-error {
    opacity: 0.45;
    filter: saturate(0.6);
}

.gallery-item--featured .gallery-photo {
    height: 340px;
    min-height: 0;
}

.gallery-item:hover .gallery-photo {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to top, rgba(11, 15, 26, 0.88) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 1rem 1.2rem;
    gap: 0.2rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-num {
    color: var(--accent);
    font-family: var(--font-main);
    font-size: 0.62rem;
    letter-spacing: 2px;
    opacity: 0.75;
}

.gallery-caption {
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.3;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(7, 9, 15, 0.96);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 89vh;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: var(--glow-strong);
}

.lightbox-caption {
    color: var(--text-muted);
    margin-top: 1.2rem;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    text-align: center;
    max-width: 600px;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 1.6rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.lightbox-close:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 1px solid var(--border);
    color: var(--accent);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, border-color 0.3s, opacity 0.3s;
    z-index: 1;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(200, 169, 106, 0.15);
    border-color: var(--accent);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: rgba(200, 169, 106, 0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(200, 169, 106, 0.6); }

/* ===== RESPONSIVE ===== */

/* --- Tablet 900px --- */
@media (max-width: 900px) {
    .navbar { padding: 0.9rem 1.5rem; }
    .nav-links { display: none; }
    .nav-toggle { display: flex; }

    .hero-content { flex-direction: column; text-align: center; gap: 2rem; }
    .hero-tags { justify-content: center; }
    .hero-buttons { justify-content: center; }
    .section-title { display: block; text-align: center; }
    .section-intro { text-align: center; margin-left: auto; margin-right: auto; }

    .about-grid { grid-template-columns: 1fr; }
    .about-stats { grid-template-columns: repeat(4, 1fr); }

    .exp-card { grid-template-columns: 1fr; gap: 0.4rem; }
    .exp-period { min-width: unset; }
    .badge { align-self: flex-start; margin-top: 0.5rem; }

    .artifacts-grid { grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
    .restoration-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-item--featured { grid-column: span 2; grid-row: span 1; }
    .gallery-item--featured .gallery-photo { height: 260px; min-height: 0; }
    .diploma-card { flex-wrap: wrap; }
    .btn-download { width: 100%; justify-content: center; }

    .contact-form-grid { grid-template-columns: 1fr; }
}

/* --- Mobile L: 425px --- */
@media (max-width: 600px) {
    :root { --font-size-base: 15px; }

    /* Kill particles & orbs on mobile */
    #canvas { display: none; }
    body::before, body::after { display: none; }
    .hero-section::before { display: none; }

    .container { padding: 0 1.2rem; }
    .section { padding: 3.5rem 0; }
    .section-title { font-size: 1rem; letter-spacing: 2px; margin-bottom: 2rem; }

    .navbar { padding: 0.8rem 1rem; }
    .nav-logo { font-size: 1rem; letter-spacing: 2px; }

    .hero-section { padding: 5rem 1.2rem 3rem; }
    .hero-avatar { width: 150px; height: 150px; }
    .hero-label { font-size: 0.8rem; }
    .hero-title { font-size: 0.9rem; }
    .btn-primary, .btn-outline { padding: 0.65rem 1.4rem; font-size: 0.7rem; letter-spacing: 1px; }

    .about-stats { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .stat-number { font-size: 1.4rem; }
    .glass-card { padding: 1.3rem; }

    .timeline { padding-left: 0.8rem; }
    .timeline-item { grid-template-columns: 1fr; gap: 0.4rem; margin-left: 1.2rem; }
    .timeline-item::before { top: 0.4rem; left: -1.7rem; }
    .timeline-year { font-size: 0.9rem; }
    .timeline-content h3 { font-size: 0.85rem; letter-spacing: 1px; }
    .timeline-place { font-size: 0.85rem; }
    .timeline-spec { font-size: 0.8rem; }

    .skills-grid { grid-template-columns: 1fr; }
    .skill-card { flex-direction: row; align-items: flex-start; gap: 1rem; }
    .skill-icon { font-size: 1.6rem; flex-shrink: 0; margin-bottom: 0; }

    .contact-grid { grid-template-columns: 1fr; max-width: 100%; }
    .contact-block { padding: 1.8rem 1.2rem; }
    .contact-block-hint { opacity: 1; }
    .contact-form-wrap { padding: 1.5rem 1.1rem; }
    .contact-form-title { font-size: 0.95rem; letter-spacing: 1px; }
    .contact-form-subtitle { font-size: 0.85rem; margin-bottom: 1rem; }
    .form-actions { align-items: flex-start; }
    .form-submit { width: 100%; text-align: center; }

    .artifacts-grid { grid-template-columns: repeat(2, 1fr); }
    .restoration-grid { grid-template-columns: 1fr; }
    .restoration-photo { height: 220px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .gallery-item--featured { grid-column: span 2; grid-row: span 1; }
    .gallery-item--featured .gallery-photo { height: 220px; min-height: 0; }
    .gallery-photo { height: 180px; }

    .telegram-btn { width: 50px; height: 50px; bottom: 1.2rem; right: 1.2rem; }
    .telegram-btn svg { width: 22px; height: 22px; }
}

/* --- Mobile M: 375px --- */
@media (max-width: 425px) {
    :root { --font-size-base: 14.5px; }

    .container { padding: 0 1rem; }

    .hero-name { letter-spacing: 2px; }
    .hero-avatar { width: 130px; height: 130px; }
    .avatar-ring { top: -8px; left: -8px; width: calc(100% + 16px); height: calc(100% + 16px); }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn-primary, .btn-outline { text-align: center; }

    .about-stats { grid-template-columns: repeat(2, 1fr); }
    .stat-card { padding: 1rem 0.6rem; }

    .exp-title { font-size: 0.82rem; letter-spacing: 1px; }
    .exp-place { font-size: 0.82rem; }

    .skill-card h3 { font-size: 0.78rem; letter-spacing: 1px; }

    .contact-block-value { font-size: 0.88rem; }
}

/* --- Mobile S: 320px --- */
@media (max-width: 360px) {
    :root { --font-size-base: 14px; }

    .container { padding: 0 0.85rem; }
    .section { padding: 3rem 0; }

    .nav-logo { font-size: 0.9rem; }
    .hero-section { padding: 5rem 0.85rem 2.5rem; }
    .hero-avatar { width: 110px; height: 110px; }
    .hero-label { font-size: 0.75rem; letter-spacing: 1px; }
    .hero-title { font-size: 0.85rem; }
    .tag { font-size: 0.75rem; padding: 0.28rem 0.75rem; }
    .btn-primary, .btn-outline { padding: 0.6rem 1.2rem; font-size: 0.65rem; }

    .glass-card { padding: 1rem; }
    .stat-number { font-size: 1.2rem; }
    .stat-label { font-size: 0.72rem; }

    .timeline-content h3 { font-size: 0.8rem; }
    .timeline-place, .timeline-spec { font-size: 0.78rem; }

    .skills-grid { gap: 0.8rem; }
    .section-title { font-size: 0.9rem; letter-spacing: 1px; }

    .footer { font-size: 0.75rem; padding: 1.5rem 1rem; }
    .footer-main { font-size: 0.75rem; letter-spacing: 0.7px; }
    .footer-credit { font-size: 0.62rem; letter-spacing: 1px; padding: 0.22rem 0.62rem; }
    .telegram-btn { width: 46px; height: 46px; bottom: 1rem; right: 1rem; }
    .telegram-btn svg { width: 20px; height: 20px; }
}