/* ---------------------------------------------------------------------------
   Nabil Hanna — personal page
--------------------------------------------------------------------------- */

/* Self-hosted Quicksand (no external CDN — see Datenschutz) */
@font-face {
    font-family: "Quicksand";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../font/quicksand-v28-latin-regular.woff2") format("woff2");
}
@font-face {
    font-family: "Quicksand";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../font/quicksand-v28-latin-700.woff2") format("woff2");
}

/* Design tokens */
:root {
    --bg: #0c0e13;
    --bg-card: rgba(22, 26, 34, 0.72);
    --bg-card-hover: rgba(30, 35, 45, 0.85);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #eef0f4;
    --text-muted: #aab2c2;
    --accent: #5aa2ff;
    --accent-2: #9b7bff;
    --accent-soft: rgba(90, 162, 255, 0.16);
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    --maxw: 1120px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Quicksand", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Full-page portrait backdrop, fixed behind everything, dimmed for legibility */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(12, 14, 19, 0.78) 0%, rgba(12, 14, 19, 0.86) 55%, rgba(12, 14, 19, 0.95) 100%),
        url("../img/portrait.jpg") no-repeat center center / cover;
    filter: grayscale(0.55);
    z-index: -2;
}

/* Soft accent glows on top of the photo */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(900px 500px at 12% 0%, var(--accent-soft), transparent 60%),
        radial-gradient(800px 500px at 100% 100%, rgba(155, 123, 255, 0.12), transparent 55%);
    z-index: -1;
    pointer-events: none;
}

::selection {
    background: var(--accent-soft);
    color: #fff;
}

a {
    color: var(--accent);
}

img {
    max-width: 100%;
}

/* --- Topbar ------------------------------------------------------------ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(12, 14, 19, 0.45);
    border-bottom: 1px solid var(--border);
}

.topbar__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--text);
}

.brand__logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: block;
}

/* --- Sections ---------------------------------------------------------- */
.section {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(3rem, 5vw, 5rem) 1.5rem;
}

.section--service {
    border-top: 1px solid var(--border);
}

.section__head {
    margin-bottom: 1.4rem;
}

/* Combined kicker-style section title, e.g. "PRIVAT – MEINE PROJEKTE" */
.section__title {
    margin: 0;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: clamp(0.95rem, 2.2vw, 1.2rem);
    line-height: 1.2;
}

.section__lead {
    margin: 0.55rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 52ch;
}

/* --- Cards (projects + IT-Service, identical look) --------------------- */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.4rem;
}

.service {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1.6rem;
    background: var(--bg-card);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s var(--ease), border-color 0.28s var(--ease),
        box-shadow 0.28s var(--ease), background 0.28s var(--ease),
        opacity 0.4s var(--ease);
}

.service:hover,
.service:focus-visible {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
    outline: none;
}

.service__logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    margin-bottom: 0.6rem;
}

.service__name {
    font-size: 1.2rem;
    font-weight: 700;
}

.service__desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.service__url {
    margin-top: 0.4rem;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.service__url::after {
    content: " ↗";
}

/* --- Footer ------------------------------------------------------------ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem 1.4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 0.4rem;
}

.footer-links button {
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.footer-links button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

/* --- Modals (Impressum / Datenschutz) ---------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 8, 12, 0.6);
    backdrop-filter: blur(4px);
}

.modal-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(820px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: #12151c;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 28px 30px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.modal-close:hover {
    background: var(--accent);
    color: #fff;
}

.legal h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.legal h3 {
    margin: 22px 0 4px;
    font-size: 15px;
}

.legal p,
.legal li {
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

.legal .muted {
    color: var(--text-muted);
}

.legal a {
    color: var(--accent);
}

.legal ul {
    margin: 8px 0;
    padding-left: 22px;
    list-style: disc outside;
}

.legal li {
    margin: 3px 0;
}

/* --- Motion preferences ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
