/* ==========================================================================
   ProjexSimple — About page
   Dark theme by default (light theme available via toggle)
   ========================================================================== */

/* ---------- Design tokens (dark = default) ---------- */
:root {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1e222b;
    --text: #f3f4f6;
    --muted: #9aa2af;
    --text-soft: #d3d9e0;
    --border: #2a2f3a;
    --border-strong: #3a4050;
    --accent: #a6c8ff;
    --accent-strong: #bcd3ff;
    --accent-soft: #14233d;
    --primary: #a6c8ff;
    --on-primary: #00315f;
    --secondary: #6adbd2;
    --tertiary: #c9bfff;
    --grad: linear-gradient(135deg, #0060df 0%, #5a4f9e 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius: 10px;
    --radius-lg: 14px;
    --max: 1200px;
    --header-h: 68px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Light theme (toggled via .light on <html>) ---------- */
:root.light {
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-2: #f6f7f9;
    --text: #1a1d23;
    --muted: #5b6472;
    --text-soft: #3a4250;
    --border: #e2e5ea;
    --border-strong: #cdd1d9;
    --accent: #0060df;
    --accent-strong: #0050b3;
    --accent-soft: #eef4ff;
    --primary: #0060df;
    --on-primary: #ffffff;
    --secondary: #00696b;
    --tertiary: #5a4f9e;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08), 0 2px 4px rgba(16, 24, 40, 0.05);
    --shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.1), 0 2px 6px rgba(16, 24, 40, 0.06);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Animated aurora background ---------- */
.aurora-bg {
    position: fixed;
    inset: -25%;
    z-index: -1;
    pointer-events: none;
    filter: blur(70px);
    opacity: 0.55;
    will-change: transform;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
}

.aurora-blob.a {
    width: 520px;
    height: 520px;
    top: -8%;
    left: -6%;
    background: rgba(166, 200, 255, 0.2);
    animation: auroraDriftA 26s ease-in-out infinite alternate;
}

.aurora-blob.b {
    width: 440px;
    height: 440px;
    top: 26%;
    right: -10%;
    background: rgba(201, 191, 255, 0.18);
    animation: auroraDriftB 32s ease-in-out infinite alternate;
}

.aurora-blob.c {
    width: 380px;
    height: 380px;
    bottom: -18%;
    left: 26%;
    background: rgba(106, 219, 210, 0.15);
    animation: auroraDriftC 30s ease-in-out infinite alternate;
}

@keyframes auroraDriftA {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(90px, 50px) scale(1.18); }
    100% { transform: translate(-50px, 100px) scale(0.92); }
}

@keyframes auroraDriftB {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-80px, -40px) scale(1.12); }
    100% { transform: translate(60px, -90px) scale(0.9); }
}

@keyframes auroraDriftC {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(70px, -60px) scale(1.2); }
    100% { transform: translate(-70px, 40px) scale(0.95); }
}

/* Light theme: stronger, more colorful blobs */
:root.light .aurora-blob.a { background: rgba(0, 96, 223, 0.35); }
:root.light .aurora-blob.b { background: rgba(90, 79, 158, 0.32); }
:root.light .aurora-blob.c { background: rgba(0, 105, 107, 0.22); }

/* ---------- Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 17, 21, 0.9);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

:root.light .topbar {
    background: rgba(255, 255, 255, 0.9);
}

.topbar-inner {
    max-width: var(--max);
    margin: 0 auto;
    height: var(--header-h);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 0.95rem;
}

.brand-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background-image: var(--grad);
    color: #fff;
    font-weight: 800;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.topnav a {
    position: relative;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: color 0.3s, background 0.3s;
}

.topnav a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.topnav a:hover {
    color: var(--text);
    background: var(--surface-2);
}

.topnav a:hover::after,
.topnav a.active::after {
    transform: scaleX(1);
}

.topnav a.active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 700;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

.icon-btn:hover {
    border-color: var(--border-strong);
    background: var(--surface-2);
}

.menu-btn {
    display: none;
    font-size: 1.1rem;
}

/* ---------- Theme toggle tooltip ---------- */
.has-tooltip {
    position: relative;
}

.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translate(-50%, -8px);
    background: var(--text);
    color: var(--bg);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
    z-index: 70;
}

.has-tooltip::before {
    content: "";
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translate(-50%, -8px);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--text);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
    z-index: 70;
}

.has-tooltip:hover::after,
.has-tooltip:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.has-tooltip:hover::before,
.has-tooltip:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-12px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

.mobile-menu.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu a {
    display: block;
    padding: 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
    border-bottom: 0;
}

.mobile-menu a:hover {
    background: var(--surface-2);
}

.mobile-menu a.active {
    color: var(--accent);
    background: var(--accent-soft);
}

/* ---------- Dropdown navigation ---------- */
.nav-item {
    position: relative;
}

.has-dropdown::before {
    content: "";
    position: absolute;
    top: 100%;
    left: -100px;
    right: 0;
    height: 16px;
}

.caret {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

.has-dropdown:hover .caret,
.has-dropdown:focus-within .caret {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.4s ease 0.4s, transform 0.4s ease 0.4s, visibility 0.4s ease 0.4s;
    z-index: 60;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
}

.dropdown-menu .dropdown-link {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.dropdown-menu .dropdown-link::after {
    display: none;
}

.dropdown-menu .dropdown-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* Step-at-a-time reveal */
.has-dropdown:hover .dropdown-link,
.has-dropdown:focus-within .dropdown-link {
    opacity: 1;
    transform: translateY(0);
}

.has-dropdown:hover .dropdown-link:nth-child(1),
.has-dropdown:focus-within .dropdown-link:nth-child(1) {
    transition-delay: 0.1s;
}

.has-dropdown:hover .dropdown-link:nth-child(2),
.has-dropdown:focus-within .dropdown-link:nth-child(2) {
    transition-delay: 0.2s;
}

.has-dropdown:hover .dropdown-link:nth-child(3),
.has-dropdown:focus-within .dropdown-link:nth-child(3) {
    transition-delay: 0.3s;
}

/* ---------- Mobile dropdown (accordion) ---------- */
.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px;
    background: none;
    border: 0;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.mobile-dropdown-toggle:hover {
    background: var(--surface-2);
}

.mobile-dropdown .caret {
    transition: transform 0.3s ease;
}

.mobile-dropdown.open .caret {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    padding-left: 12px;
    transition: max-height 0.35s ease;
}

.mobile-dropdown.open .mobile-dropdown-menu {
    max-height: 200px;
}

.mobile-menu .mobile-dropdown-link {
    display: block;
    padding: 10px 12px;
    border-bottom: 0;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.mobile-dropdown.open .mobile-dropdown-link {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

.mobile-menu .mobile-dropdown-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
    padding: 88px 0 40px;
}

.hero .wrap {
    max-width: 820px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    box-shadow: var(--shadow-md);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    animation: fadeUp 0.6s ease both;
}

.badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 {
    font-size: clamp(2.3rem, 5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 20px 0 18px;
    animation: fadeUp 0.7s ease 0.12s both;
}

.hero .lead {
    font-size: 1.15rem;
    color: var(--text-soft);
    line-height: 1.7;
    animation: fadeUp 0.7s ease 0.24s both;
}

.lead.typing::after {
    content: "▌";
    color: var(--accent);
    margin-left: 1px;
    animation: blink 0.9s step-end infinite;
}

/* ---------- Sections ---------- */
.section {
    padding: 72px 0;
}

.section-alt {
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head {
    max-width: 720px;
    margin-bottom: 40px;
}

.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.card p {
    color: var(--text-soft);
}

.card-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    margin-bottom: 18px;
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ---------- Team ---------- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.team-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background-image: var(--grad);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.avatar--ghost {
    background: var(--surface-2);
    color: var(--accent);
    border: 1px dashed var(--border-strong);
}

.team-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.role {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.team-card p {
    color: var(--text-soft);
    font-size: 0.95rem;
}

/* ---------- Note / sources ---------- */
.note p {
    font-size: 1.05rem;
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 48px 24px 32px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer-brand p {
    color: var(--text-soft);
    margin-top: 14px;
    max-width: 320px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 6px;
}

.footer-col a {
    color: var(--muted);
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-col span {
    color: var(--muted);
    font-size: 0.95rem;
}

.footer-bottom {
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px 24px 28px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--muted);
    flex-wrap: wrap;
}

/* ---------- Hero entrance animation ---------- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* ---------- Reveal animation (JS adds .show) ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.show {
    opacity: 1;
    transform: translateY(0);
}

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

    .team-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 820px) {
    .topnav {
        display: none;
    }

    .menu-btn {
        display: grid;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 56px 0 24px;
    }

    .hero .wrap {
        padding: 32px 22px;
    }

    .section {
        padding: 52px 0;
    }

    .topbar-inner {
        padding: 0 16px;
    }

    .footer-inner {
        padding: 36px 16px 24px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 500px) {
    .mobile-dropdown-toggle {
        padding: 14px 12px;
    }

    .mobile-dropdown-link {
        padding: 12px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }

    .hero .badge,
    .hero h1,
    .hero .lead {
        animation: none;
    }

    .aurora-blob {
        animation: none;
    }
}


