/* SoftCrafts – site styles */
:root {
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-2: #eef1f7;
    --text: #0f172a;
    --muted: #55607a;
    --border: #e2e7f0;
    --accent: #0ea5a4;
    --accent-2: #6366f1;
    --accent-soft: rgba(14, 165, 164, .1);
    --hero-bg: #0b1120;
    --hero-text: #e8edf7;
    --hero-muted: #9aa6bf;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --radius: 16px;
    --max: 1120px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --display: "Space Grotesk", var(--font);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1120;
        --surface: #121a2c;
        --surface-2: #172036;
        --text: #e8edf7;
        --muted: #9aa6bf;
        --border: #222d45;
        --accent: #2dd4bf;
        --accent-2: #818cf8;
        --accent-soft: rgba(45, 212, 191, .12);
        --hero-bg: #070b16;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; letter-spacing: -.01em; }

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

/* ---------- Navigation ---------- */
.nav {
    position: fixed; inset: 0 0 auto 0; z-index: 50;
    transition: background .25s, box-shadow .25s, backdrop-filter .25s;
}
.nav.scrolled {
    background: rgba(11, 17, 32, .82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 20px; color: #fff; letter-spacing: -.02em; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a { color: var(--hero-muted); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links .btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 8px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 999px;
    font-weight: 600; font-size: 15px;
    border: 1px solid transparent;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 8px 24px rgba(99, 102, 241, .3);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(99, 102, 241, .45); }
.btn-ghost { color: var(--hero-text); border-color: rgba(255, 255, 255, .2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: var(--hero-bg); color: var(--hero-text);
    padding: 150px 0 100px;
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(600px 400px at 85% 20%, rgba(99, 102, 241, .35), transparent 70%),
        radial-gradient(500px 400px at 10% 90%, rgba(20, 184, 166, .28), transparent 70%);
}
.hero::after {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--accent);
    padding: 6px 14px; border-radius: 999px;
    background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .25);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #2dd4bf; box-shadow: 0 0 0 4px rgba(45, 212, 191, .2); }
.hero h1 { font-size: clamp(38px, 6vw, 62px); font-weight: 700; margin: 22px 0 8px; color: #fff; }
.hero h1 .grad {
    background: linear-gradient(135deg, #2dd4bf, #818cf8);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .role { font-size: clamp(18px, 2.4vw, 22px); color: var(--hero-text); font-weight: 500; margin: 0 0 18px; }
.hero .lead { color: var(--hero-muted); font-size: 17px; max-width: 560px; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.socials { display: flex; gap: 10px; margin-left: 6px; }
.socials a {
    width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center;
    color: var(--hero-text); border: 1px solid rgba(255, 255, 255, .15);
    transition: background .2s, color .2s;
}
.socials a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.socials svg { width: 18px; height: 18px; }

.portrait { position: relative; justify-self: center; width: min(320px, 80%); aspect-ratio: 1; }
.portrait::before {
    content: ""; position: absolute; inset: -6px; border-radius: 50%;
    background: conic-gradient(from 180deg, #2dd4bf, #818cf8, #2dd4bf);
    filter: blur(.5px);
}
.portrait > img {
    position: relative; width: 100%; height: 100%; object-fit: cover; object-position: 50% 65%;
    border-radius: 50%; border: 6px solid var(--hero-bg); background: #1e293b;
}
.badge-float {
    position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); white-space: nowrap; width: max-content;
    background: rgba(18, 26, 44, .9); backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px;
    padding: 10px 14px; font-size: 12px; color: var(--hero-text);
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.badge-float strong { display: block; color: #fff; font-size: 13px; }
.badge-float .ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, #2dd4bf, #818cf8); color: #fff; }
.badge-float .ic svg { width: 18px; height: 18px; }
.badge-float .cert { width: 48px; height: 48px; margin: -6px 0; flex: none; }
.badge-float > div { flex: none; }

.stats { grid-column: 1 / -1; position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 72px; }
.stat { border-left: 2px solid rgba(255, 255, 255, .12); padding: 4px 0 4px 18px; }
.stat b { display: block; font-family: var(--display); font-size: 32px; color: #fff; line-height: 1.1; }
.stat span { font-size: 14px; color: var(--hero-muted); }

/* ---------- Sections ---------- */
section { padding: 100px 0; }
section.alt { background: var(--surface-2); }
.section-head { max-width: 680px; margin-bottom: 52px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; display: block; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { color: var(--muted); font-size: 17px; margin: 14px 0 0; }

/* About */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.about p { font-size: 17px; color: var(--muted); margin: 0 0 16px; }
.about p strong { color: var(--text); font-weight: 600; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 24px; box-shadow: var(--shadow); }
.info-card dl { margin: 0; }
.info-card div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.info-card div:last-child { border-bottom: 0; }
.info-card dt { color: var(--muted); }
.info-card dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.info-card dd a { color: var(--text); }

/* Services */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px 24px; box-shadow: var(--shadow);
    transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.card .ic {
    width: 48px; height: 48px; border-radius: 12px; margin-bottom: 20px;
    display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent);
}
.card .ic svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }

/* Timeline */
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 36px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), var(--accent-2), var(--border)); border-radius: 2px; }
.tl-item { position: relative; margin-bottom: 24px; }
.tl-item::before {
    content: ""; position: absolute; left: -33px; top: 30px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--surface); border: 3px solid var(--accent);
}
.tl-item.current::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); }
.tl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.tl-card h3 { font-size: 20px; }
.tl-meta { color: var(--muted); font-size: 14px; margin-top: 4px; }
.tl-date { font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.tl-card ul { margin: 16px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
.tl-card li { margin-bottom: 6px; }
.tl-card li strong { color: var(--text); font-weight: 600; }
.tl-card > p { color: var(--muted); font-size: 15px; margin: 12px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding: 0; list-style: none; }
.chips li {
    font-size: 13px; font-weight: 500; padding: 4px 12px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
section.alt .chips li { background: var(--bg); }
.earlier-title { font-family: var(--display); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 40px 0 16px; }
.tl-item.compact .tl-card { padding: 20px 24px; }
.tl-item.compact h3 { font-size: 17px; }
.tl-item.compact::before { top: 24px; border-color: var(--muted); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.skills .card h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.skills .card h3 .ic { width: 36px; height: 36px; margin: 0; border-radius: 10px; }
.skills .card h3 .ic svg { width: 18px; height: 18px; }

/* Certs & Education */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.list-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 28px; box-shadow: var(--shadow); }
.list-card h3 { font-size: 18px; padding: 20px 0 8px; }
.list-row { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--border); }
.list-row .ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.list-row .ic svg { width: 20px; height: 20px; }
.list-row b { display: block; font-weight: 600; font-size: 15px; }
.list-row span { color: var(--muted); font-size: 14px; }
.list-row .when { margin-left: auto; white-space: nowrap; font-size: 13px; color: var(--muted); padding-top: 2px; }

/* CTA */
.cta { background: var(--hero-bg); color: var(--hero-text); position: relative; overflow: hidden; text-align: center; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 300px at 50% 0%, rgba(99, 102, 241, .35), transparent 70%), radial-gradient(500px 300px at 50% 100%, rgba(20, 184, 166, .25), transparent 70%); }
.cta .container { position: relative; max-width: 760px; }
.cta h2 { font-size: clamp(28px, 4vw, 42px); color: #fff; margin-bottom: 16px; }
.cta p { color: var(--hero-muted); font-size: 17px; margin: 0 0 32px; }
.cta .hero-actions { justify-content: center; }

/* Footer */
footer { background: var(--hero-bg); color: var(--hero-muted); font-size: 14px; border-top: 1px solid rgba(255, 255, 255, .06); padding: 28px 0; }
footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--hero-text); }

/* Legal page */
.legal-hero { padding: 130px 0 60px; }
.legal-hero .container { display: block; }
.legal { max-width: 800px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; }
.legal h3 { font-size: 17px; margin: 28px 0 8px; }
.legal p { color: var(--muted); margin: 0 0 12px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .card, .btn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero .container { grid-template-columns: 1fr; }
    .portrait { order: -1; width: 200px; }
    .badge-float { display: none; }
    .about, .two-col { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 760px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: absolute; top: 68px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: rgba(11, 17, 32, .97); padding: 8px 16px 16px;
        display: none;
    }
    .nav.open .nav-links { display: flex; }
    .nav.open { background: rgba(11, 17, 32, .97); }
    .nav-links a { display: block; padding: 12px 8px; }
    .nav-links .btn { justify-content: center; margin-top: 8px; }
    .container { padding: 0 16px; }
    section { padding: 72px 0; }
    .hero { padding: 120px 0 72px; }
    .grid-4 { grid-template-columns: 1fr; }
    .timeline { padding-left: 28px; }
    .timeline::before { left: 5px; }
    .tl-item::before { left: -29px; }
    .tl-card { padding: 22px 20px; }
    .list-card { padding: 8px 20px; }
    .list-row { flex-wrap: wrap; }
    .list-row .when { margin-left: 56px; }
}
