/* ===========================
   KALPOS 2026 (Fresh Layout)
   =========================== */

:root{
    --bg:#0b0f17;
    --text:rgba(255,255,255,.92);
    --muted:rgba(255,255,255,.68);
    --border:rgba(255,255,255,.10);
    --surface:rgba(15, 20, 30, .78);
    --surfaceGlass:rgba(15, 20, 30, .62);

    --shadow:0 18px 50px rgba(0,0,0,.35);
    --r:18px;

    --brand:#7c5cff;
    --brand2:#23d5ab;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
html{ scroll-behavior:smooth; }

body{
    margin:0;
    font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    color:var(--text);
    background: var(--bg);
}

a{ color:inherit; text-decoration:none; }
a:hover{ opacity:.92; }

.container{ width:min(1120px, 92vw); margin:0 auto; }

/* ===========================
   SECTIONS + BACKGROUNDS
   =========================== */

.section{
    position: relative;
    isolation: isolate;
    padding: 86px 0;
    scroll-margin-top: 90px;
}

.section.hero{ padding-top: 120px; }

.section::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:-1;
    pointer-events:none;
    background: var(--bg);
}

.section.hero::before{
    background:
        radial-gradient(1200px 800px at 20% 0%, rgba(124,92,255,.20), transparent 60%),
        radial-gradient(900px 700px at 90% 10%, rgba(35,213,171,.16), transparent 55%),
        var(--bg);
}

#work.section::before{
    background:
        radial-gradient(900px 600px at 15% 0%, rgba(124,92,255,.08), transparent 60%),
        var(--bg);
}

#projects.section::before{
    background:
        radial-gradient(900px 600px at 80% 10%, rgba(35,213,171,.08), transparent 60%),
        var(--bg);
}

#stack.section::before,
#contact.section::before{
    background: var(--bg);
}

/* ===========================
   TOPBAR / NAV
   =========================== */

.topbar{
    position:fixed;
    inset: 0 0 auto 0;
    z-index:50;

    background: rgba(10,14,22,.70);
    backdrop-filter: blur(14px);
    border-bottom:1px solid var(--border);
}

.topbar-inner{
    height: 64px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.brand{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:800;
}

.brand-dot{
    width:10px;
    height:10px;
    border-radius:999px;
    background: linear-gradient(90deg, var(--brand), var(--brand2));
    box-shadow: 0 0 0 6px rgba(124,92,255,.12);
}

.brand-text{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 56vw;
}

.nav{
    display:flex;
    align-items:center;
    gap:18px;
}

/* Default nav links */
.nav a{
    color:rgba(255,255,255,.76);
    font-weight:700;
}

.nav a:hover{ color:white; }

/* Desktop nav links (text style) */
.nav .nav-link{
    padding: 10px 10px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease;
}

.nav .nav-link:hover{
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.10);
}

/* Optional: keep CTA (Contact button) tighter */
.nav .nav-cta{
    padding: 9px 12px;
}

/* Hamburger button */
.nav-toggle{
    display:none;
    width:42px;
    height:42px;
    border-radius: 12px;
    border:1px solid var(--border);
    background: rgba(255,255,255,.06);
    align-items:center;
    justify-content:center;
    gap:5px;
    padding:10px;
}

.nav-toggle span{
    display:block;
    width:18px;
    height:2px;
    background: rgba(255,255,255,.85);
    border-radius:999px;
}

/* ===========================
   BUTTONS / PILLS
   =========================== */

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    padding: 12px 16px;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--brand), var(--brand2));
    color:#0b0f17;

    font-weight: 800;
    border:0;
    box-shadow: 0 10px 30px rgba(124,92,255,.18);
    transition: transform .15s ease, filter .15s ease;
}

.btn:hover{
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.btn.ghost{
    background: rgba(255,255,255,.06);
    color: var(--text);
    border:1px solid var(--border);
    box-shadow:none;
}

.btn.btn-sm{
    padding: 9px 12px;
    border-radius: 12px;
}

.pill{
    display:inline-flex;
    align-items:center;
    gap:10px;

    padding: 8px 12px;
    border-radius: 999px;
    border:1px solid var(--border);
    background: rgba(255,255,255,.06);

    color: var(--muted);
    font-weight: 600;
}

.pill .dot{
    width:8px;
    height:8px;
    border-radius:999px;
    background: linear-gradient(90deg, var(--brand), var(--brand2));
}

/* ===========================
   TYPOGRAPHY
   =========================== */

.section-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:20px;
    margin-bottom: 26px;
}

.section-head h2{
    margin:0;
    font-size: 34px;
    letter-spacing:-.02em;
}

.section-head p{
    margin:0;
    color:var(--muted);
    max-width: 62ch;
}

.grad{
    background: linear-gradient(90deg, var(--brand), var(--brand2));
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
}

.muted{
    color: var(--muted);
    margin: 10px 0 0;
    line-height: 1.55;
}

/* ===========================
   HERO
   =========================== */

.hero-grid{
    display:grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 24px;
    align-items:start;
}

.hero h1{
    margin: 14px 0 12px;
    font-size: clamp(40px, 4.4vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.lead{
    color: var(--muted);
    font-size: 1.06rem;
    line-height:1.6;
    margin: 0 0 18px;
}

.cta-row{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-top: 8px;
}

.meta-row{
    display:grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
    margin-top: 22px;
}

.mini{
    padding: 14px;
    border-radius: var(--r);
    border:1px solid var(--border);
    background: rgba(255,255,255,.05);
}

.mini-label{ color: var(--muted); font-size: .86rem; }
.mini-value{ margin-top: 6px; font-weight: 700; }

/* ===========================
   CARDS
   =========================== */

.card{
    border:1px solid var(--border);
    background: var(--surface);
    border-radius: var(--r);
    padding: 18px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
}

.card.glass{
    background: var(--surfaceGlass);
    backdrop-filter: blur(14px);
}

.profile{
    display:flex;
    align-items:center;
    gap:14px;
}

.avatar{
    width: 58px;
    height: 58px;
    border-radius: 18px;
    overflow:hidden;
    border:1px solid var(--border);
}

.avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.name{ font-weight: 800; }
.subtitle{ color: var(--muted); font-weight: 600; margin-top: 2px; }

.card-row{
    display:flex;
    gap:14px;
    margin-top: 16px;
}

.link{
    color: rgba(255,255,255,.82);
    font-weight: 700;
}

.link:hover{
    color: white;
    text-decoration: underline;
}

/* Pills / Chips */
.chips{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top: 14px;
}

.chip{
    padding: 7px 10px;
    border-radius: 999px;
    border:1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.78);
    font-weight: 600;
    font-size: .86rem;
}

/* Bento area */
.bento{
    margin-top: 14px;
    display:grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
}

.k{ color: var(--muted); font-weight: 700; font-size: .92rem; }
.v{ margin-top: 6px; font-weight: 800; }

/* ===========================
   GRIDS
   =========================== */

.grid{ display:grid; gap: 14px; }
.grid.projects{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.stack{ grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid.contact{ grid-template-columns: 1fr 1.2fr; }

/* ===========================
   PROJECT CARDS
   =========================== */

.project{
    display:flex;
    flex-direction:column;
    height:100%;
    transition: transform .2s ease, border-color .2s ease;
}

.project:hover{
    transform: translateY(-6px);
    border-color: rgba(255,255,255,.18);
}

.proj-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.proj-title{
    font-weight: 900;
    letter-spacing:-.02em;
}

.badge{
    padding: 6px 10px;
    border-radius: 999px;
    border:1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.74);
    font-weight: 700;
    font-size: .82rem;
}

.proj-links{
    margin-top: auto;
    padding-top: 14px;
}

/* Project-specific pill polish */
.project .chips{
    gap: 8px;
    margin-top: 12px;
}

.project .chip{
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.05);
    color: rgba(245,248,255,.88);
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .01em;
    line-height: 1;
}

.project .badge{
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.86);
    font-size: .8rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    min-width: 118px;
}

.project .proj-title{
    line-height: 1.2;
}

.project.project-wide{
    grid-column: span 2;
}

#projects .section-head h2{
    line-height: 1.15;
}

@media (max-width: 980px){
    .project.project-wide{
        grid-column: span 1;
    }
}

/* ===========================
   TIMELINE (WORK)
   =========================== */

.timeline{ display:grid; gap: 14px; }

.tl-item{
    position:relative;
    padding-left: 18px;
}

.tl-dot{
    position:absolute;
    left:0;
    top: 16px;
    width:8px;
    height:8px;
    border-radius:999px;
    background: linear-gradient(90deg, var(--brand), var(--brand2));
}

.tl-card{
    border:1px solid var(--border);
    background: var(--surface);
    border-radius: var(--r);
    padding: 18px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
}

.tl-top{
    display:flex;
    justify-content:space-between;
    gap:10px;
}

.tl-title{ font-weight: 900; }
.tl-time{ color: var(--muted); font-weight: 700; }

.tl-card ul{
    margin: 10px 0 0;
    padding-left: 18px;
    color: rgba(255,255,255,.80);
}

.tl-card li{ margin: 6px 0; }

/* ===========================
   CONTACT FORM
   =========================== */

.form{
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form .row{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form label{
    display:flex;
    flex-direction: column;
    gap: 8px;
}

.form button{
    margin-top: 6px;
}

label span{
    display:block;
    color: var(--muted);
    font-weight:700;
    font-size:.9rem;
    margin-bottom: 8px;
}

.contact-links{
    display:flex;
    gap: 14px;
    margin-top: 10px;
}

input, textarea{
    width:100%;
    padding: 12px 12px;
    border-radius: 14px;
    border:1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: white;
    outline: none;
}

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

.notice{
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border:1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    font-weight: 700;
}

.notice.ok{ border-color: rgba(35,213,171,.35); }
.notice.err{ border-color: rgba(255,90,90,.35); }

/* ===========================
   FOOTER
   =========================== */

.footer{
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

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

@media (max-width: 980px){
    .hero-grid{ grid-template-columns: 1fr; }
    .meta-row{ grid-template-columns: 1fr; }

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

    .nav{ gap: 12px; }

    .section{ padding: 70px 0; }
    .section.hero{ padding-top: 96px; }
}

/* ===========================
   MOBILE MENU (FINAL FIXED)
   =========================== */

@media (max-width: 820px){
    .topbar-inner{ gap: 12px; }

    .nav-toggle{
        display:flex;
        background: rgba(15, 20, 30, .70);
        border:1px solid rgba(255,255,255,.14);
        box-shadow: 0 10px 30px rgba(0,0,0,.25);
    }

    .nav{
        position:absolute;
        top: 64px;
        right: 4vw;
        left: 4vw;

        display:none;
        flex-direction: column;
        gap: 10px;

        padding: 12px;
        border-radius: 18px;

        background: rgba(10,14,22,.97);
        border: 1px solid rgba(255,255,255,.16);
        backdrop-filter: blur(18px);

        box-shadow: 0 20px 60px rgba(0,0,0,.45);

        max-height: calc(100vh - 90px);
        overflow: auto;
    }

    .nav.is-open{ display:flex; }

    /* Mobile menu items - card style */
    .nav a{
        width: 100%;
        display:flex;
        align-items:center;
        justify-content:center;

        padding: 14px 14px;
        border-radius: 14px;

        background: rgba(15, 20, 30, .92);
        border: 1px solid rgba(255,255,255,.12);

        color: rgba(255,255,255,.92);
        font-weight: 800;
    }

    .nav a:hover{
        background: rgba(255,255,255,.10);
        border-color: rgba(255,255,255,.18);
    }

    /* Keep Contact CTA gradient on mobile */
    .nav a.btn{
        background: linear-gradient(90deg, var(--brand), var(--brand2));
        color:#0b0f17;
        border:0;
    }
}
/* Hide "Top" link on desktop */
.nav-top{
    display:none;
}

/* Show "Top" link only on mobile */
@media (max-width: 820px){
    .nav-top{
        display:flex;
    }
}

/* Greek typography tuning: keep cards readable, shrink only major headings */
html[lang="el"] .hero h1{
    font-size: clamp(34px, 4vw, 54px);
}

html[lang="el"] .section-head h2{
    font-size: 31px;
}
