:root {
    --bg: #07111f;
    --bg-soft: #0f1d2d;
    --panel: #ffffff;
    --panel-alt: #f4f7fb;
    --text: #122033;
    --muted: #51657e;
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --accent: #26c6da;
    --border: rgba(18, 32, 51, 0.08);
    --shadow: 0 20px 40px rgba(25, 39, 56, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: #f7f9fc;
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(7, 17, 31, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

.brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.nav a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 0.9rem 1.4rem;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.26);
}

.button:hover {
    transform: translateY(-1px);
}

.button.small {
    padding: 0.7rem 1.1rem;
    font-size: 0.9rem;
}

.button-secondary {
    background: #edf1ff;
    color: var(--text);
    box-shadow: none;
}

.hero {
    background: linear-gradient(135deg, #07111f 0%, #10243d 52%, #1c3053 100%);
    color: white;
    padding: 96px 0 72px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.eyebrow,
.section-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    line-height: 1.08;
    margin: 0 0 1rem;
}

.lead {
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 620px;
}

.lead.compact {
    color: var(--muted);
}

.cta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    color: rgba(255, 255, 255, 0.9);
}

.hero-photo-wrap {
    display: flex;
    justify-content: center;
}

.hero-photo {
    width: min(100%, 420px);
    border-radius: 32px;
    border: 6px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    object-fit: cover;
    aspect-ratio: 0.95;
}

.section {
    padding: 88px 0;
}

.section.alt {
    background: var(--panel-alt);
}

.split-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 36px;
    align-items: start;
}

.about-content {
    max-width: 800px;
}

h2 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.15;
}

.facts-list {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
    color: var(--text);
}

.info-card,
.service-card,
.skill-card,
.project-card,
.admin-panel,
.stat-card,
.auth-card {
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.info-card {
    padding: 2rem;
}

.info-card h3 {
    margin-top: 0;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.skills-grid,
.services-grid,
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-card,
.service-card,
.project-card {
    padding: 1.5rem;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-icon,
.service-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary);
    font-size: 1.4rem;
}

.progress {
    height: 10px;
    border-radius: 99px;
    background: rgba(79, 70, 229, 0.08);
    overflow: hidden;
    margin-top: 0.8rem;
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.service-card {
    text-align: left;
}

.service-card h3,
.project-card h3,
.skill-card h3 {
    margin: 1rem 0 0.5rem;
}

.timeline {
    position: relative;
    margin-top: 2rem;
    padding-left: 20px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(79, 70, 229, 0.2);
}

.timeline-item {
    position: relative;
    padding-left: 28px;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -2px;
    top: 10px;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 4px solid #f7f9fc;
}

.timeline-content {
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: 0 12px 26px rgba(17, 24, 39, 0.06);
}

.timeline-meta,
.company {
    margin: 0 0 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.project-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 1rem;
}

.project-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #edf2ff, #e1f8ff);
    color: var(--muted);
    border: 1px dashed rgba(79, 70, 229, 0.2);
}

.project-tag {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.project-links a {
    color: var(--primary);
    font-weight: 600;
}

.contact-section {
    padding-bottom: 100px;
}

.contact-wrap {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 2rem;
    align-items: start;
}

.contact-list {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
    color: var(--muted);
}

.contact-form {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.field-row,
.two-col,
.three-col {
    display: grid;
    gap: 1rem;
}

.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

input,
textarea,
select,
button {
    font: inherit;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(18, 32, 51, 0.12);
    background: #f9fbff;
    color: var(--text);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.stack-form {
    display: grid;
    gap: 1rem;
}

.form-status {
    margin-top: 1rem;
    color: #0b7a66;
    font-weight: 600;
}

.form-status.error {
    color: #b42318;
}

.site-footer {
    background: #07111f;
    color: rgba(255, 255, 255, 0.7);
    padding: 1.5rem 0;
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.admin-body {
    display: flex;
    min-height: 100vh;
    background: #f4f7fb;
}

.admin-sidebar {
    width: 250px;
    background: #0d1727;
    color: white;
    padding: 1.4rem 1rem;
}

.admin-brand {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.admin-nav {
    display: grid;
    gap: 0.6rem;
}

.admin-nav a {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.admin-nav a.active,
.admin-nav a:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.admin-main {
    flex: 1;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    text-align: center;
}

.stat-card h3 {
    margin: 0 0 0.5rem;
    color: var(--muted);
}

.stat-card strong {
    font-size: 2rem;
}

.admin-panel {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.flash-message {
    padding: 0.9rem 1rem;
    background: rgba(11, 122, 102, 0.08);
    color: #0b7a66;
    border: 1px solid rgba(11, 122, 102, 0.15);
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.flash-error {
    padding: 0.9rem 1rem;
    background: rgba(180, 35, 24, 0.08);
    color: #b42318;
    border: 1px solid rgba(180, 35, 24, 0.18);
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    text-align: left;
    padding: 0.9rem 0.8rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.inline-form {
    display: inline-block;
    margin: 0 0.4rem 0.3rem 0;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.logout-form {
    margin-top: 1rem;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #07111f 0%, #10243d 100%);
}

.auth-card {
    width: min(420px, calc(100% - 32px));
    padding: 2rem;
    background: rgba(255,255,255,0.96);
}

.auth-card h1 {
    margin-top: 0;
}

.muted {
    color: var(--muted);
}

@media (max-width: 900px) {
    .hero-grid,
    .split-grid,
    .contact-wrap,
    .skills-grid,
    .services-grid,
    .project-grid,
    .stats-grid,
    .two-col,
    .three-col {
        grid-template-columns: 1fr;
    }

    .admin-body {
        display: block;
    }

    .admin-sidebar {
        width: 100%;
    }

    .nav {
        display: none;
    }

    .footer-wrap,
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
