﻿:root {
    --radius: 14px;
    --shadow: 0 18px 40px rgba(0,0,0,0.14);
}

* { box-sizing: border-box; }
html { width: 100%; overflow-x: hidden; }
body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

body.theme-dark {
    --bg: #0e1117;
    --panel: #141926;
    --panel-2: #101524;
    --text: #e9eef8;
    --muted: #9eabc0;
    --accent: #6bd6b8;
    --accent-2: #5e8bff;
    --border: #1f2940;
    background: radial-gradient(circle at 18% 22%, rgba(94,139,255,0.08), transparent 36%),
                radial-gradient(circle at 80% 0%, rgba(107,214,184,0.12), transparent 32%),
                var(--bg);
    color: var(--text);
}

body.theme-light {
    --bg: #f6f8fb;
    --panel: #ffffff;
    --panel-2: #edf1f7;
    --text: #1f2937;
    --muted: #5b6575;
    --accent: #118b70;
    --accent-2: #325dff;
    --border: #dfe4ef;
    background: radial-gradient(circle at 15% 20%, rgba(50,93,255,0.08), transparent 32%),
                radial-gradient(circle at 82% -10%, rgba(17,139,112,0.08), transparent 32%),
                var(--bg);
    color: var(--text);
}

.page { min-height: 100vh; display: flex; flex-direction: column; }
.content {
    flex: 1;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto 48px;
    padding: 72px 12px 0;
    box-sizing: border-box;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--panel) 82%, transparent);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 14px 16px;
    box-sizing: border-box;
    position: relative;
}

.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.brand-logo { height: 32px; display: block; }
body.theme-light .brand-logo.dark { display: none; }
body.theme-light .brand-logo.light { display: block; }
body.theme-dark .brand-logo.light { display: none; }
body.theme-dark .brand-logo.dark { display: block; filter: brightness(0) invert(1); }

.nav { display: flex; align-items: center; gap: 12px; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; border: 1px solid transparent; transition: 0.2s ease; }
.nav a:hover { color: var(--text); border-color: var(--border); }
.nav a.active { color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: var(--border); }
.nav a.pill { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0b1020; font-weight: 700; border: none; }

.nav-toggle { display: none; background: transparent; border: 1px solid var(--border); padding: 8px; border-radius: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); margin: 4px 0; }

.theme-toggle { border: 1px solid var(--border); background: var(--panel-2); color: var(--text); padding: 8px 10px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.theme-toggle .icon-sun { display: none; }
body.theme-light .theme-toggle .icon-sun { display: inline; }
body.theme-light .theme-toggle .icon-moon { display: none; }
body.theme-dark .theme-toggle .icon-moon { display: inline; }
body.theme-dark .theme-toggle .icon-sun { display: none; }

.hero { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: center; padding: 20px 0 8px; }
.hero-text h1 { font-size: clamp(28px, 4vw, 42px); margin: 8px 0; }
.hero .lede { color: var(--muted); max-width: 640px; }
.hero-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.hero-visual { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: flex; justify-content: center; }
.hero-visual img { max-width: 100%; height: auto; display: block; border-radius: 10px; }

.section { margin-top: 38px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-heading h2, .section-heading h1 { margin: 0; }
.section-heading .muted { color: var(--muted); margin: 8px 0 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card img { width: 100%; border-radius: 10px; margin-bottom: 10px; }
img, svg { max-width: 100%; height: auto; }

.meta { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 1px; font-size: 13px; margin: 0; }
.lede { color: var(--muted); font-size: 17px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); text-decoration: none; background: var(--panel-2); transition: all 0.2s ease; }
.btn:hover { border-color: color-mix(in srgb, var(--accent) 70%, transparent); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0b1020; border: none; font-weight: 700; }
.btn.ghost { background: transparent; }

.link { color: var(--accent); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

.pill { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--text); font-size: 13px; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: start; }
.info-stack { display: grid; gap: 12px; }
.info-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--panel); box-shadow: var(--shadow); }

.quote { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; font-size: 18px; background: var(--panel); box-shadow: var(--shadow); }

.timeline { border-left: 1px solid var(--border); margin-top: 14px; padding-left: 18px; display: grid; gap: 14px; }
.timeline-item { position: relative; }
.timeline-item .dot { position: absolute; left: -29px; top: 6px; width: 10px; height: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 50%; box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 28%, transparent); }
.timeline-content { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }

.projects .card { position: relative; overflow: hidden; }
.projects .card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 22% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 48%); pointer-events: none; }

.footer { width: 100%; border-top: 1px solid var(--border); background: var(--panel); padding: 28px 0 34px; color: var(--muted); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 0 4vw; display: grid; grid-template-columns: repeat(4, minmax(200px, 1fr)); gap: 20px; align-items: start; }
.footer-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.footer-brand p { margin: 0 0 10px; }
.footer-meta { display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.footer-block h4 { margin: 0 0 10px; color: var(--text); }
.footer-links, .footer-social, .footer-contact { display: grid; gap: 8px; }
.footer-social a, .footer-links a { display: inline-flex; align-items: center; gap: 8px; }
.footer-contact span { display: inline-flex; align-items: center; gap: 8px; }
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer h4 { margin: 0 0 8px; color: var(--text); }
.footer a { color: var(--accent); text-decoration: none; display: block; margin: 4px 0; }
.footer a:hover { text-decoration: underline; }

.info-card { border: 1px dashed var(--border); padding: 12px 14px; border-radius: var(--radius); background: var(--panel); color: var(--muted); }
.alert { border-radius: var(--radius); padding: 14px 16px; margin: 8px 0 16px; border: 1px solid; }
.alert.success { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.alert.error { border-color: rgba(255, 132, 132, 0.4); background: rgba(255, 132, 132, 0.12); }

.form { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-weight: 600; }
.form input, .form textarea { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font: inherit; }
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 1px solid color-mix(in srgb, var(--accent) 80%, transparent); }

.table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.table th, .table td { border: 1px solid var(--border); padding: 10px; text-align: left; }
.table th { background: var(--panel-2); color: var(--muted); }
.table td actions { display: flex; gap: 6px; }

.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

@media (max-width: 960px) {
    .footer-inner { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
}

@media (max-width: 640px) {
    .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .topbar { position: fixed; top: 0; left: 0; right: 0; width: 100%; box-sizing: border-box; }
    .topbar-inner { padding: 10px 12px; }
    .nav { display: none; position: absolute; top: 64px; right: 12px; left: 12px; background: var(--panel); padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); flex-direction: column; box-shadow: var(--shadow); }
    .nav.open { display: flex; }
    .nav a { width: 100%; text-align: center; }
    .nav-toggle { display: inline-block; }
    .theme-toggle { width: 100%; justify-content: center; }
    .hero { grid-template-columns: 1fr; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-visual { margin: 0 auto; width: 100%; }
    .content { padding: 96px 12px 0; margin-bottom: 32px; }
    .card-grid { grid-template-columns: 1fr; }
    .timeline { border-left: none; padding-left: 0; }
    .timeline-item { padding-left: 0; }
    .timeline-item .dot { position: relative; left: 0; top: 0; width: 10px; height: 10px; margin-bottom: 8px; box-shadow: none; }
}
