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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-family, "Helvetica Neue", Arial, sans-serif);
    line-height: 1.5;
    overflow-x: hidden;
}

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

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

ul { list-style: none; margin: 0; padding: 0; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 32px;
}

.btn {
    display: inline-block;
    padding: 14px 34px;
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text);
    background: transparent;
}
.btn-outline:hover {
    background: var(--text);
    color: var(--bg);
    transform: translateY(-2px);
}

.btn-solid {
    border: none;
    background: var(--text);
    color: var(--bg);
    width: 100%;
}
.btn-solid:hover { opacity: 0.85; }

/* ------------------------------------------------------------------ */
/* Background stars                                                    */
/* ------------------------------------------------------------------ */
.stars {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.35), transparent),
        radial-gradient(2px 2px at 30% 80%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 90% 60%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 45% 40%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 20% 55%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 70% 90%, rgba(255,255,255,0.3), transparent);
    background-repeat: repeat;
    background-size: 100% 100%;
    opacity: 0.8;
}

/* ------------------------------------------------------------------ */
/* Header / Nav                                                        */
/* ------------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(11,11,15,0.9), rgba(11,11,15,0));
    backdrop-filter: blur(6px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
}

.logo {
    display: inline-flex;
    flex-shrink: 0;
}

.logo-mark {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* More than 3 characters no longer fit a circle — stretch into a pill instead. */
.logo-mark--wide {
    width: auto;
    min-width: 38px;
    border-radius: 999px;
    padding: 0 16px;
}

.logo-image {
    display: block;
    flex-shrink: 0;
    height: 38px;
    width: auto;
}

.nav ul {
    display: flex;
    gap: 36px;
}

.nav a {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    transition: color 0.2s ease;
}
.nav a:hover { color: var(--text); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

/* ------------------------------------------------------------------ */
/* Hero                                                                 */
/* ------------------------------------------------------------------ */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--bg);
}

.hero-inner {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

.hero-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(560px, 80vw);
    height: min(560px, 80vw);
    transform: translate(-50%, -55%);
    z-index: 0;
    pointer-events: none;
}

.blob {
    width: 100%;
    height: 100%;
    border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.55), transparent 45%),
        radial-gradient(circle at 70% 70%, rgba(255,255,255,0.12), transparent 55%),
        linear-gradient(135deg, #3a3a42, #1c1c22 60%, #0c0c10);
    box-shadow: inset -30px -30px 80px rgba(0,0,0,0.55), inset 20px 20px 60px rgba(255,255,255,0.05);
    filter: blur(0.3px) contrast(1.05);
    animation: blob-morph 14s ease-in-out infinite;
}

@keyframes blob-morph {
    0%, 100% { border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%; }
    33%      { border-radius: 58% 42% 40% 60% / 55% 65% 35% 45%; }
    66%      { border-radius: 48% 52% 55% 45% / 40% 50% 50% 60%; }
}

.hero-slides {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-slide {
    display: none;
}
.hero-slide.is-active {
    display: block;
    animation: fade-up 0.6s ease both;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-title {
    margin: 0;
    font-size: clamp(2.6rem, 9vw, 6rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
}

.hero-subtitle {
    margin: 22px 0 10px;
    font-size: 0.9rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 22px;
}
.hero-subtitle::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 1px;
    background: var(--border);
}

.hero-slide .btn { margin-top: 12px; }

.error-message {
    max-width: 46ch;
    margin: 18px auto 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.hero-arrow:hover { background: rgba(255,255,255,0.08); border-color: var(--text); }
.hero-arrow--prev { left: 0; }
.hero-arrow--next { right: 0; }

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}
.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.hero-dot.is-active {
    background: var(--text);
    transform: scale(1.2);
}

/* ------------------------------------------------------------------ */
/* About                                                                */
/* ------------------------------------------------------------------ */
.about { padding: 100px 0; background: var(--bg-alt); }

.about-inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    align-items: center;
}

.about-photo img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.about-text {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 60ch;
}

.about-stats {
    display: flex;
    gap: 48px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 2rem; font-weight: 700; }
.stat-label { font-size: 0.8rem; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; margin-top: 4px; }

/* ------------------------------------------------------------------ */
/* News                                                                 */
/* ------------------------------------------------------------------ */
.news { padding: 100px 0; }

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.news-card {
    display: block;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.news-card:hover { border-color: var(--text); transform: translateY(-4px); }

.news-date {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.news-title { margin: 14px 0 10px; font-size: 1.15rem; }
.news-excerpt { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ------------------------------------------------------------------ */
/* Projects                                                             */
/* ------------------------------------------------------------------ */
.projects { padding: 100px 0; background: var(--bg-alt); }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.project-card { display: block; }

.project-image {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
}
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.project-card:hover .project-image img { transform: scale(1.05); }

.project-info { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.project-title { margin: 0; font-size: 1.1rem; }
.project-tag { font-size: 0.8rem; color: var(--text-muted); }

/* ------------------------------------------------------------------ */
/* Contacts                                                             */
/* ------------------------------------------------------------------ */
.contacts { padding: 100px 0; }

.contacts-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contacts-desc { color: var(--text-muted); max-width: 44ch; }

.contacts-details { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.contacts-details a:hover { text-decoration: underline; }

.socials { display: flex; gap: 20px; margin-top: 28px; flex-wrap: wrap; }
.socials a { font-size: 0.85rem; color: var(--text-muted); }
.socials a:hover { color: var(--text); }

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

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.8rem; letter-spacing: 0.05em; color: var(--text-muted); text-transform: uppercase; }

/* Honeypot: kept in the layout (not display:none) so simple bots still find
   and fill it, but moved off-screen and unreachable for real visitors. */
.field-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.field input,
.field textarea {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--text);
}

.form-notice { padding: 12px 16px; border-radius: 10px; font-size: 0.9rem; margin: 0 0 18px; }
.form-notice--success { background: rgba(80, 200, 120, 0.12); border: 1px solid rgba(80, 200, 120, 0.4); }
.form-notice--error   { background: rgba(220, 80, 80, 0.12); border: 1px solid rgba(220, 80, 80, 0.4); }

/* ------------------------------------------------------------------ */
/* Footer                                                               */
/* ------------------------------------------------------------------ */
.site-footer { padding: 32px 0 48px; border-top: 1px solid var(--border); }
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.back-to-top { color: var(--text-muted); }
.back-to-top:hover { color: var(--text); }

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */
@media (max-width: 900px) {
    .about-inner { grid-template-columns: 1fr; text-align: center; }
    .about-photo { max-width: 220px; margin: 0 auto; }
    .about-stats { justify-content: center; }
    .contacts-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .nav {
        position: fixed;
        inset: 72px 16px auto 16px;
        background: var(--bg-alt);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 16px;
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }
    .nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .nav ul { flex-direction: column; gap: 4px; }
    .nav a { display: block; padding: 10px 8px; }
    .nav-toggle { display: flex; }

    .hero-arrow { width: 38px; height: 38px; }
    .hero-arrow--prev { left: 8px; }
    .hero-arrow--next { right: 8px; }
}

@media (max-width: 480px) {
    .container { padding: 0 18px; }
    .btn { padding: 12px 24px; font-size: 0.78rem; }
    .about, .news, .projects, .contacts { padding: 70px 0; }
}
