/* ==========================================================
   ibanousis.tech — base: tokens, shell, loader, nav, hero
   ========================================================== */

:root {
    /* Backgrounds */
    --bg-0: #050b13;
    --bg-1: #0a1929;
    --bg-2: #0e2238;
    --panel: rgba(13, 28, 46, 0.66);
    --panel-solid: #0c1b2d;

    /* Lines */
    --line: rgba(148, 186, 222, 0.13);
    --line-strong: rgba(148, 186, 222, 0.30);

    /* Brand blues (kept from original site) */
    --blue: #3a6ea5;
    --blue-lt: #4d85bd;
    --blue-deep: #2a5080;
    --cyan: #00f2ff;
    --cyan-soft: rgba(0, 242, 255, 0.72);

    /* Text */
    --text: #e9f2f9;
    --muted: #93adc2;
    --faint: #5d7890;

    /* Type */
    --font-d: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
    --font-m: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --rad: 14px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-d);
    background: var(--bg-0);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(0, 242, 255, 0.25);
    color: #ffffff;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.mono {
    font-family: var(--font-m);
}

/* ===== Background layers ===== */
#aurora-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(120, 170, 220, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 170, 220, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, black 0%, transparent 78%);
    mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, black 0%, transparent 78%);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(3, 7, 12, 0.55) 100%);
}

main, .site-nav, .footer, #back-to-top {
    position: relative;
    z-index: 10;
}

/* ===== Boot loader ===== */
#boot-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-0);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

#boot-loader.boot-out {
    opacity: 0;
    visibility: hidden;
}

.boot-term {
    width: min(560px, calc(100vw - 3rem));
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: rgba(8, 18, 30, 0.92);
    box-shadow: 0 0 80px rgba(0, 140, 200, 0.12), 0 30px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.boot-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.boot-dots {
    display: flex;
    gap: 6px;
}

.boot-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(148, 186, 222, 0.25);
}

.boot-dots i:first-child {
    background: rgba(0, 242, 255, 0.6);
}

.boot-title {
    font-family: var(--font-m);
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.08em;
}

#boot-lines {
    padding: 1.1rem 1.2rem 1.4rem;
    min-height: 172px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.boot-line {
    font-family: var(--font-m);
    font-size: 0.8rem;
    color: var(--muted);
    animation: bootIn 0.18s ease-out;
}

.boot-line.boot-cmd {
    color: var(--text);
}

.boot-ok {
    color: var(--cyan);
}

@keyframes bootIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Navigation ===== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    background: rgba(6, 13, 22, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.site-nav.scrolled {
    background: rgba(6, 13, 22, 0.85);
    border-bottom-color: var(--line);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.brand-mark {
    width: 9px;
    height: 18px;
    background: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.7);
    animation: markBlink 2.4s step-start infinite;
}

@keyframes markBlink {
    0%, 60%, 100% { opacity: 1; }
    70%, 90% { opacity: 0.25; }
}

.brand-text {
    font-family: var(--font-m);
    font-size: 0.9rem;
    color: var(--text);
    letter-spacing: 0.02em;
}

.brand-text span {
    color: var(--cyan-soft);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.9rem;
}

.nav-link {
    font-family: var(--font-m);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.25s ease;
    position: relative;
}

.nav-link::before {
    content: '/';
    color: rgba(0, 242, 255, 0);
    margin-right: 0.3em;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link:hover::before,
.nav-link.active::before {
    color: var(--cyan);
}

.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
}

.menu-btn .bar {
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.2s ease;
}

.menu-btn.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--cyan); }
.menu-btn.open .bar:nth-child(2) { opacity: 0; }
.menu-btn.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--cyan); }

/* ===== Layout scaffolding ===== */
.wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.section {
    padding: 7.5rem 0 5.5rem;
}

.sec-head {
    margin-bottom: 3.5rem;
}

.sec-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.sec-no {
    font-family: var(--font-m);
    font-size: 0.8rem;
    color: var(--cyan-soft);
    letter-spacing: 0.1em;
}

.sec-rule {
    height: 1px;
    width: 64px;
    background: linear-gradient(90deg, var(--line-strong), transparent);
}

.sec-path {
    font-family: var(--font-m);
    font-size: 0.8rem;
    color: var(--faint);
    letter-spacing: 0.06em;
}

.sec-title {
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.sec-sub {
    margin-top: 0.9rem;
    color: var(--muted);
    font-size: 1.05rem;
    font-weight: 300;
    max-width: 640px;
    text-wrap: pretty;
}

/* Reveal on scroll */
.rv {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.rv.on {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .rv {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8.5rem 0 4rem;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 3rem;
}

.hero-eyebrow {
    font-family: var(--font-m);
    font-size: 0.82rem;
    color: var(--cyan-soft);
    letter-spacing: 0.08em;
    margin-bottom: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.hero-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.8);
    animation: pingDot 2.4s ease-in-out infinite;
}

@keyframes pingDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.5); }
    50% { box-shadow: 0 0 0 7px rgba(0, 242, 255, 0); }
}

.hero-name {
    font-size: clamp(3rem, 6.5vw, 5.4rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin-bottom: 1.4rem;
}

.hero-name em {
    font-style: normal;
    background: linear-gradient(100deg, var(--blue-lt) 0%, var(--cyan) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-role {
    font-family: var(--font-m);
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    color: var(--text);
    margin-bottom: 1.8rem;
    min-height: 1.6em;
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
}

.hero-role .prompt {
    color: var(--cyan);
}

.hero-role .cursor {
    display: inline-block;
    width: 0.55em;
    height: 1.1em;
    background: var(--cyan);
    transform: translateY(0.18em);
    animation: cursorBlink 1s step-start infinite;
}

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

.hero-desc {
    color: var(--muted);
    font-size: 1.06rem;
    font-weight: 300;
    line-height: 1.75;
    max-width: 560px;
    margin-bottom: 2.4rem;
    text-wrap: pretty;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.8rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-m);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    padding: 0.85rem 1.7rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: transform 0.25s var(--ease), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-primary {
    background: linear-gradient(120deg, var(--blue) 0%, #2c81a8 100%);
    color: #ffffff;
    box-shadow: 0 8px 28px rgba(35, 110, 170, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 34px rgba(0, 190, 230, 0.4);
}

.btn-ghost {
    border-color: var(--line-strong);
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
    border-color: var(--cyan-soft);
    color: var(--cyan);
    transform: translateY(-2px);
}

/* Hero stats readout */
.hero-stats {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(10, 22, 36, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    max-width: 620px;
}

.stat {
    flex: 1;
    padding: 1.1rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-right: 1px solid var(--line);
}

.stat:last-child {
    border-right: none;
}

.stat-num {
    font-family: var(--font-m);
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--cyan);
    text-shadow: 0 0 18px rgba(0, 242, 255, 0.35);
}

.stat-label {
    font-family: var(--font-m);
    font-size: 0.66rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.5;
}

/* Hero visual — neural network + profile node */
.hero-visual {
    position: relative;
    height: clamp(380px, 44vw, 560px);
}

#neural-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.profile-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(140px, 15vw, 190px);
    height: clamp(140px, 15vw, 190px);
    border-radius: 50%;
    z-index: 3;
}

.profile-node img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--bg-1);
    box-shadow: 0 0 50px rgba(0, 160, 210, 0.25), 0 14px 40px rgba(0, 0, 0, 0.5);
    display: block;
}

.profile-node .ring {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 242, 255, 0.35);
    animation: ringSpin 26s linear infinite;
    pointer-events: none;
}

.profile-node .ring-2 {
    inset: -28px;
    border: 1px solid var(--line);
    border-top-color: var(--cyan-soft);
    animation: ringSpin 14s linear infinite reverse;
}

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

.profile-fallback {
    display: none;
}

.profile-node.no-img img {
    display: none;
}

.profile-node.no-img .profile-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed var(--line-strong);
    background: repeating-linear-gradient(135deg, rgba(20, 40, 62, 0.7) 0 10px, rgba(14, 30, 48, 0.7) 10px 20px);
    font-family: var(--font-m);
    font-size: 0.68rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.5;
}

.node-tag {
    position: absolute;
    font-family: var(--font-m);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    color: var(--faint);
    border: 1px solid var(--line);
    background: rgba(8, 18, 30, 0.7);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 4;
}

.node-tag b {
    color: var(--cyan-soft);
    font-weight: 500;
}

.node-tag.t1 { top: 9%; left: 4%; }
.node-tag.t2 { bottom: 13%; right: 2%; }

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-m);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    color: var(--faint);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.scroll-hint::after {
    content: '';
    width: 1px;
    height: 38px;
    background: linear-gradient(var(--cyan-soft), transparent);
    animation: dropLine 2.2s var(--ease) infinite;
}

@keyframes dropLine {
    0% { transform: scaleY(0); transform-origin: top; }
    55% { transform: scaleY(1); transform-origin: top; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===== Back to top + footer ===== */
#back-to-top {
    position: fixed;
    bottom: 1.6rem;
    right: 1.6rem;
    z-index: 90;
    font-family: var(--font-m);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: rgba(8, 18, 30, 0.85);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#back-to-top:hover {
    color: var(--cyan);
    border-color: var(--cyan-soft);
}

.footer {
    border-top: 1px solid var(--line);
    padding: 2.2rem 0 2.6rem;
    margin-top: 3rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer p {
    color: var(--faint);
    font-size: 0.85rem;
    font-weight: 300;
}

.footer .footer-sig {
    font-family: var(--font-m);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--faint);
}

.footer .footer-sig span {
    color: var(--cyan-soft);
}
