/* ============================================================
   Athannos Portfolio — AWS Amplify dark theme
   ============================================================ */

:root {
    --bg: #0f1b2d;
    --bg-soft: #142438;
    --bg-elevated: #16273b;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    --text: #e6edf3;
    --text-muted: #9fb0c3;
    --text-dim: #7b8ea3;

    --accent: #7c3aed;
    --accent-2: #4f46e5;
    --accent-soft: rgba(124, 58, 237, 0.16);
    --cyan: #22d3ee;

    --gradient: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);

    --radius: 12px;
    --radius-sm: 8px;

    --font: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

    --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    --nav-height: 64px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

ul {
    list-style: none;
}

.container {
    width: min(1080px, 100% - 2.5rem);
    margin-inline: auto;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    background: var(--accent);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
    left: 0;
}

/* ============================================================
   Navigation
   ============================================================ */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(15, 27, 45, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s ease;
}

.nav.is-scrolled {
    box-shadow: var(--shadow);
}

.nav__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav__brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.nav__link {
    font-size: 0.92rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
    position: relative;
}

.nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--text);
}

.nav__link:hover::after,
.nav__link.is-active::after {
    transform: scaleX(1);
}

.lang-switch {
    display: inline-flex;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    overflow: hidden;
    margin-left: 0.4rem;
}

.lang-switch__btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.75rem;
    background: transparent;
    color: var(--text-muted);
    border: 0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch__btn.is-active {
    background: var(--gradient);
    color: #fff;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px;
}

.nav__toggle-bar {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn--primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 6px 20px rgba(99, 79, 235, 0.35);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99, 79, 235, 0.5);
}

.btn--ghost {
    border-color: var(--border-strong);
    color: var(--text);
    background: transparent;
}

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

/* ============================================================
   Hero
   ============================================================ */

.hero {
    position: relative;
    padding: 6.5rem 0 5.5rem;
    overflow: hidden;
    text-align: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 300px at 50% -10%, rgba(124, 58, 237, 0.25), transparent 70%),
        radial-gradient(500px 260px at 85% 20%, rgba(34, 211, 238, 0.10), transparent 70%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
}

.hero__avatar {
    width: 108px;
    height: 108px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    font-weight: 700;
    color: #fff;
    background: var(--gradient);
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.45);
    border: 3px solid rgba(255, 255, 255, 0.12);
}

.hero__name {
    font-size: clamp(2.6rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    background: linear-gradient(120deg, #fff 20%, #c4b5fd 60%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__realname {
    margin-top: 0.5rem;
    font-size: 1.15rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hero__role {
    margin-top: 0.9rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--cyan);
}

.hero__desc {
    max-width: 620px;
    margin: 1.1rem auto 0;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.hero__cta {
    margin-top: 2.2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================================
   Sections
   ============================================================ */

.section {
    padding: 4.5rem 0;
}

.section__title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.section__title::before {
    content: "";
    width: 6px;
    height: 26px;
    border-radius: 3px;
    background: var(--gradient);
    flex-shrink: 0;
}

.section__title--sub {
    margin-top: 3.5rem;
}

.section__subtitle {
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 2.2rem;
}

/* ============================================================
   About
   ============================================================ */

.about__text {
    color: var(--text-muted);
    max-width: 780px;
    margin-bottom: 1.1rem;
    font-size: 1.02rem;
}

.about__highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.about__highlights li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1.3rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.about__num {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================================================
   Projects
   ============================================================ */

.projects {
    display: grid;
    gap: 1.8rem;
}

.project {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 1.8rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project:hover {
    transform: translateY(-4px);
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: var(--shadow);
}

.project__media {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    min-height: 230px;
}

.project__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project__name {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.project__desc {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.98rem;
}

.project__features {
    margin-bottom: 1.1rem;
}

.project__features li {
    position: relative;
    padding-left: 1.35rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
}

.project__features li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--cyan);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.3px;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #c4b5fd;
    border: 1px solid rgba(124, 58, 237, 0.35);
}

.project__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--cyan);
    transition: gap 0.2s ease;
}

.project__link:hover {
    gap: 0.7rem;
}

/* ============================================================
   Skills
   ============================================================ */

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 1.2rem;
}

.skill-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124, 58, 237, 0.5);
}

.skill-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: #c4b5fd;
    margin-bottom: 1rem;
}

.skill-card__icon svg {
    width: 22px;
    height: 22px;
}

.skill-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
}

.skill-card__list li {
    position: relative;
    padding: 0.28rem 0 0.28rem 1.15rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.skill-card__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.85em;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--cyan);
}

/* ============================================================
   Timeline (experience / education)
   ============================================================ */

.timeline {
    position: relative;
    padding-left: 1.6rem;
    border-left: 2px solid rgba(124, 58, 237, 0.35);
}

.timeline__item {
    position: relative;
    padding-bottom: 2.1rem;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__item::before {
    content: "";
    position: absolute;
    left: calc(-1.6rem - 7px);
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gradient);
    border: 2px solid var(--bg);
}

.timeline__role {
    font-size: 1.12rem;
    font-weight: 700;
}

.timeline__company {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.15rem;
}

.timeline__date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 0.3px;
    margin-top: 0.35rem;
}

.timeline__desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.7rem;
    max-width: 780px;
}

/* ============================================================
   Languages
   ============================================================ */

.languages {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.language {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.4rem;
}

.language__name {
    font-weight: 700;
}

.language__level {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ============================================================
   Contact
   ============================================================ */

.section--contact {
    background:
        radial-gradient(600px 260px at 50% 0%, rgba(124, 58, 237, 0.16), transparent 70%),
        var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.8rem;
}

.contact__channels {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact__item {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.contact__item svg {
    width: 20px;
    height: 20px;
    color: var(--cyan);
    flex-shrink: 0;
}

.contact__item:hover {
    transform: translateY(-3px);
    border-color: rgba(124, 58, 237, 0.5);
    color: var(--text);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
    padding: 2rem 0;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.88rem;
}

.footer__tags {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.4px;
    color: var(--text-dim);
    opacity: 0.85;
}

/* ============================================================
   Reveal animations
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

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

    .btn,
    .project,
    .skill-card,
    .contact__item {
        transition: none;
    }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
    .project {
        grid-template-columns: 1fr;
    }

    .project__media {
        min-height: 200px;
        max-height: 260px;
    }
}

@media (max-width: 768px) {
    .nav__toggle {
        display: flex;
    }

    .nav__menu {
        position: fixed;
        inset: var(--nav-height) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        padding: 0.6rem 1.25rem 1.1rem;
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .nav__menu.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav__link {
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--border);
        font-size: 1rem;
    }

    .nav__link::after {
        display: none;
    }

    .lang-switch {
        margin: 1rem 0 0;
        align-self: flex-start;
    }

    .hero {
        padding: 4.5rem 0 4rem;
    }

    .section {
        padding: 3.25rem 0;
    }

    .contact__channels {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        width: min(1080px, 100% - 1.75rem);
    }

    .hero__name {
        font-size: 2.35rem;
    }

    .hero__cta {
        flex-direction: column;
        align-items: stretch;
    }

    .about__highlights li {
        width: 100%;
    }

    .language {
        min-width: 100%;
    }
}
