/* ==========================================================================
   About Page — std::cpp
   ========================================================================== */

.page-about {
    background:
        radial-gradient(ellipse 60% 40% at 72% 0%, rgba(6, 182, 212, 0.08), transparent 70%),
        radial-gradient(ellipse 46% 36% at 12% 6%, rgba(37, 99, 235, 0.09), transparent 72%);
}

/* ---------- Hero ---------- */
.about-hero {
    position: relative;
    padding: 42px 0 30px;
    overflow: hidden;
}

.about-hero::after {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.18), transparent);
}

.about-hero .breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 28px;
    color: var(--muted-2);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.03em;
}

.about-hero .breadcrumb a {
    color: var(--muted);
}

.about-hero .breadcrumb a:hover {
    color: var(--blue);
}

.about-hero .breadcrumb .sep {
    color: rgba(37, 99, 235, 0.3);
}

.about-hero .breadcrumb .current {
    color: var(--blue);
}

.about-hero-content {
    position: relative;
}

.about-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 14px;
}

.about-hero h1 {
    margin: 14px 0 12px;
    color: var(--ink);
    font-family: var(--mono);
    font-size: clamp(38px, 5.4vw, 62px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.about-hero h1 .prefix {
    color: rgba(37, 99, 235, 0.32);
    font-weight: 500;
}

.about-hero h1 .cursor {
    display: inline-block;
    width: 0.42em;
    height: 0.82em;
    margin-left: 0.08em;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--blue), var(--cyan));
    animation: caret-blink 1.1s steps(1) infinite;
    vertical-align: -0.04em;
}

.about-hero p {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.8;
}

/* ---------- Section Layout ---------- */
.about-section {
    padding: 0 0 80px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.about-main {
    min-width: 0;
}

.about-aside {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
}

/* ---------- Blocks ---------- */
.about-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.3s var(--ease);
}

.about-block:hover {
    box-shadow: var(--shadow-sm);
}

.about-block:last-child {
    margin-bottom: 0;
}

.about-block h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

.about-block p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    margin: 0 0 16px;
}

.about-block p:last-child {
    margin-bottom: 0;
}

.about-block code {
    font-family: var(--mono);
    font-size: 13px;
    background: rgba(37, 99, 235, 0.06);
    color: var(--blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* ---------- Philosophy List ---------- */
.philosophy-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.philosophy-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.philosophy-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grad);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    font-family: var(--mono);
}

.philosophy-item h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 6px;
}

.philosophy-item p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

/* ---------- Side Cards ---------- */
.about-aside .side-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.3s var(--ease);
}

.about-aside .side-card:hover {
    box-shadow: var(--shadow-sm);
}

.about-aside .side-head {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-2);
    margin-bottom: 16px;
    font-family: var(--mono);
}

/* Info Card */
.about-info .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.about-info .info-item:last-child {
    border-bottom: none;
}

.about-info .info-label {
    font-size: 13px;
    color: var(--muted);
}

.about-info .info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    font-family: var(--mono);
}

/* Quote Card */
.about-quote blockquote {
    margin: 0;
    padding: 0;
    border: none;
}

.about-quote blockquote p {
    font-size: 15px;
    font-style: italic;
    color: var(--text);
    line-height: 1.7;
    margin: 0 0 12px;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--blue);
}

.about-quote cite {
    font-size: 13px;
    color: var(--muted);
    font-style: normal;
}

/* CTA Card */
.about-cta h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 8px;
}

.about-cta p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 16px;
}

/* ---------- Friend Link ---------- */
.friend-link-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.friend-link-header h2 {
    margin: 0;
}

.friend-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.friend-link-loading,
.friend-link-empty {
    font-size: 14px;
    color: var(--muted-2);
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px;
}

.friend-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.friend-link-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.friend-link-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
}

.friend-link-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.friend-link-info {
    min-width: 0;
    overflow: hidden;
}

.friend-link-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-link-desc {
    display: block;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.friend-link-pending {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--surface);
}

.friend-link-pending .friend-link-name {
    color: var(--muted);
}

.friend-link-pending:hover {
    box-shadow: none;
    transform: none;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 20, 40, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(12px);
    transition: transform 0.3s var(--ease);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-2);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--ink);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

#friendLinkForm {
    padding: 0 24px 24px;
}

.form-group {
    margin-bottom: 16px;
}

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

.form-group label .required {
    color: var(--danger);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--ink);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-tip {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(37, 99, 235, 0.04);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--blue);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

/* Loading state */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    color: #fff;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-aside {
        position: static;
        order: -1;
        margin-bottom: 24px;
    }

    .about-block {
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .about-hero {
        padding: 24px 0 32px;
    }

    .about-block {
        padding: 20px;
    }

    .philosophy-item {
        gap: 12px;
    }

}


