:root {
    --bg-color: #0a0a0f;
    --card-bg: rgba(13, 17, 23, 0.7);
    --card-hover: rgba(22, 27, 34, 0.85);
    --border-light: #30363d;
    --border-line: rgba(255, 255, 255, 0.1);
    --text-main: #e6e6e6;
    --text-muted: #8b949e;
    --accent-cyan: #00ffff;
    --accent-cyan-glow: rgba(0, 255, 255, 0.3);
    --accent-blue: #58a6ff;
    --accent-green: #50fa7b;
    --font-stack: 'JetBrains Mono', 'Fira Code', Monaco, Consolas, monospace;
}

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

body {
    color: var(--text-main);
    font-family: var(--font-stack);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    line-height: 1.6;
    padding: 40px 20px;
    background-color: var(--bg-color); 
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    
    background-image: 
        linear-gradient(rgba(10, 10, 15, 0.88), rgba(10, 10, 15, 0.88)),
        linear-gradient(rgba(0, 255, 255, 0.015) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(0, 255, 255, 0.015) 1px, transparent 1px),
        url('https://naomu.net/background.png');
    
    background-size: 100% 100%, 30px 30px, 30px 30px, cover;
    background-position: center;
    background-repeat: no-repeat, repeat, repeat, no-repeat;
    
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 780px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Назад на корень */
.nav-bar {
    margin-bottom: 5px;
}

.nav-back {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.nav-back:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
}

/* Центрированный профиль */
.profile-header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 0 20px 0;
    border-bottom: 1px solid var(--border-line);
}

.avatar-wrapper {
    position: relative;
    margin-bottom: 14px;
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
}

.profile-header-center h1 {
    font-size: 1.7rem;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 1px;
}

.profile-header-center .subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Карточки */
.card-box {
    background-color: var(--card-bg); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-line);
}

.card-title {
    font-size: 0.95rem;
    color: var(--accent-cyan);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-line);
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Биография */
.bio-paragraphs {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.7;
}

.bio-paragraphs strong {
    color: #ffffff;
}

/* Traceroute структура */
.traceroute-list {
    display: flex;
    flex-direction: column;
}

.hop-row {
    display: flex;
    gap: 20px;
    position: relative;
    padding-bottom: 24px;
}

/* Линия соединяет только 01 -> 02 -> 03 и не свисает в конце */
.hop-row:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 38px; /* Ровно от нижнего края кружка */
    bottom: 0;
    left: 18px; /* Центр кружка (38px / 2 = 19px, минус 1px половины ширины линии) */
    width: 2px;
    background: var(--border-light);
    z-index: 1;
}

.hop-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hop-idx {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0d1117;
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-muted);
    flex-shrink: 0;
}

.hop-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    padding: 14px 18px;
    border-radius: 6px;
}

.hop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.hop-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: #ffffff;
}

.hop-rtt {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    font-family: var(--font-stack);
}

.hop-content p {
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.6;
}

.hop-content a {
    color: var(--accent-blue);
    text-decoration: none;
}

.hop-content a:hover {
    text-decoration: underline;
}

/* Стили финальной точки маршрута */
.hop-row.destination {
    padding-bottom: 0;
}

.hop-row.destination .hop-idx {
    border-color: var(--accent-green);
    color: var(--accent-green);
    box-shadow: 0 0 10px rgba(80, 250, 123, 0.2);
}

.hop-row.destination .hop-content {
    border-color: rgba(80, 250, 123, 0.3);
}

.hop-row.destination .hop-rtt {
    color: var(--accent-green);
}

/* Футер */
.footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-line);
    padding-top: 20px;
}

@media (max-width: 600px) {
    .hop-row {
        flex-direction: column;
        gap: 10px;
    }

    .hop-row::before {
        display: none;
    }
    
    .traceroute-list::before {
        display: none;
    }
    
    .hop-meta {
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }
}