:root {
    --bg: #0f1720;
    --bg-alt: #131e2a;
    --surface: #1b2836;
    --text: #e7edf3;
    --text-muted: #9fb0c0;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --accent: #22d3ee;
    --border: #26374a;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --max: 1080px;
    --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 32, .85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
    flex: 0 0 auto;
    display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; font-weight: 700; letter-spacing: .5px;
}
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { color: var(--text-muted); font-size: .95rem; font-weight: 500; }
.main-nav a:hover { color: var(--text); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
    color: var(--text-muted); font-weight: 600; font-size: .9rem;
    padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
}
.lang-switch:hover { color: var(--text); text-decoration: none; border-color: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 10px;
    font-weight: 600; font-size: .98rem; cursor: pointer;
    border: 1px solid transparent; transition: transform .15s ease, background .2s ease;
    justify-content: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
    padding: 96px 0 84px;
    background:
        radial-gradient(1000px 400px at 80% -10%, rgba(59, 130, 246, .22), transparent),
        radial-gradient(800px 400px at 0% 10%, rgba(34, 211, 238, .12), transparent);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 56px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-role { color: var(--accent); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; font-size: .85rem; }
.hero-name { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; margin: 12px 0; overflow-wrap: anywhere; }
.hero-tagline { color: var(--text-muted); font-size: 1.2rem; max-width: 720px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-photo-wrap { justify-self: end; width: min(100%, 360px); aspect-ratio: 18 / 23; border-radius: 26px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); box-shadow: var(--shadow); background: var(--surface); }
.hero-photo { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center top; }
.profile-strip { display: none; background: var(--surface); border-block: 1px solid var(--border); }
.profile-strip-inner { display: flex; align-items: center; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
.profile-strip img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; object-position: center top; border: 2px solid var(--accent); }
.profile-strip strong, .profile-strip span { display: block; }
.profile-strip span { color: var(--text-muted); font-size: .92rem; line-height: 1.35; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-title { font-size: 1.8rem; margin-bottom: 20px; position: relative; padding-bottom: 12px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.mt-lg { margin-top: 56px; }
.lead { color: var(--text-muted); font-size: 1.1rem; max-width: 820px; }

/* ---------- Focus grid ---------- */
.focus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 18px; margin-top: 30px; }
.focus-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: border-color .2s, transform .2s; }
.focus-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.focus-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.focus-card p { color: var(--text-muted); font-size: .96rem; }

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 6px; }
.timeline-item { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-period { color: var(--accent); font-weight: 600; font-size: .92rem; padding-top: 3px; }
.timeline-body h3 { font-size: 1.12rem; }
.timeline-org { color: var(--text-muted); font-weight: 500; margin-bottom: 6px; }
.timeline-body p:last-child { color: var(--text-muted); }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.skill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.skill-card h3 { margin-bottom: 14px; font-size: 1.1rem; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { background: rgba(59, 130, 246, .14); border: 1px solid var(--border); color: var(--text); padding: 6px 12px; border-radius: 999px; font-size: .85rem; }

.lang-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.lang-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.lang-name { font-weight: 600; }
.lang-level { color: var(--text-muted); font-size: .92rem; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-list { list-style: none; margin: 18px 0 26px; display: flex; flex-direction: column; gap: 10px; }
.contact-list strong { color: var(--text); }
.contact-list a { overflow-wrap: anywhere; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .9rem; color: var(--text-muted); font-weight: 500; }
.field input, .field textarea {
    background: var(--bg); border: 1px solid var(--border); color: var(--text);
    border-radius: 10px; padding: 12px 14px; font: inherit; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, .25); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 14px; font-weight: 500; min-height: 1.2em; }
.form-status.ok { color: #34d399; }
.form-status.err { color: #f87171; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 26px 0; color: var(--text-muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .container { padding: 0 20px; }
    .header-inner { gap: 12px; }
    .main-nav {
        position: fixed; inset: 68px 0 auto 0;
        flex-direction: column; gap: 0;
        background: var(--bg-alt); border-bottom: 1px solid var(--border);
        padding: 8px 24px; transform: translateY(-120%); transition: transform .25s ease;
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--border); }
    .nav-toggle { display: flex; }
    .hero-inner { grid-template-columns: 1fr; gap: 34px; }
    .hero-photo-wrap { justify-self: start; width: min(100%, 320px); }
    .hero { padding: 76px 0 64px; }
    .section { padding: 58px 0; }
    .contact-layout { grid-template-columns: 1fr; }
    .timeline-item { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .header-inner { min-height: 62px; }
    .brand-mark { width: 34px; height: 34px; border-radius: 9px; font-size: .9rem; }
    .header-actions { gap: 8px; margin-left: auto; }
    .header-actions .btn-sm { display: none; }
    .lang-switch { padding: 6px 8px; font-size: .82rem; }
    .nav-toggle { padding: 6px 0 6px 6px; }
    .nav-toggle span { width: 22px; }
    .main-nav { inset: 62px 0 auto 0; padding: 8px 16px; }
    .hero-inner { gap: 26px; }
    .hero-photo-wrap { display: none; }
    .profile-strip { display: block; }
    .hero { padding: 58px 0 52px; }
    .hero-role { font-size: .78rem; }
    .hero-name { font-size: 2.15rem; }
    .hero-tagline, .lead { font-size: 1rem; }
    .hero-cta { flex-direction: column; gap: 10px; }
    .hero-cta .btn, .contact-info > .btn { width: 100%; }
    .section { padding: 48px 0; }
    .section-title { font-size: 1.5rem; }
    .focus-card, .skill-card, .contact-form { padding: 20px; }
    .timeline-item { padding: 18px 0; }
    .mt-lg { margin-top: 42px; }
}

@media (max-width: 380px) {
    .container { padding: 0 14px; }
    .brand-name { display: none; }
    .hero-name { font-size: 1.95rem; }
    .btn { padding: 11px 16px; }
    .focus-card, .skill-card, .contact-form { padding: 18px; }
}
