/* =========================================================================
   Ermias Gelaye Gaga — career site stylesheet
   Shares design tokens with /Photography so the whole portfolio feels like one site.
   Theme: <html data-theme="light|dark"> (set before first paint).
   ========================================================================= */

:root {
    --brand: #0a6cff;
    --brand-strong: #0052cc;
    --brand-soft: rgba(10, 108, 255, 0.10);
    --accent: #1e40af;
    --ink: #0f172a;
    --ink-2: #334155;
    --ink-3: #64748b;
    --bg: #ffffff;
    --surface: #f5f7fb;
    --surface-2: #ffffff;
    --border: #e2e8f0;
    --success: #1e40af;
    --danger: #dc2626;
    --warning: #f59e0b;
    --on-brand: #fff;
    --gradient: linear-gradient(135deg, #0a6cff 0%, #1e40af 100%);
    --hero-bg: radial-gradient(1200px 600px at 10% -10%, rgba(10, 108, 255, .14), transparent 60%),
               radial-gradient(900px 500px at 100% 0%, rgba(30, 64, 175, .10), transparent 60%);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --shadow-lg: 0 24px 48px rgba(15, 23, 42, .16);
    --ease: cubic-bezier(.4, 0, .2, 1);
    --nav-h: 68px;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-head: 'Poppins', 'Inter', system-ui, sans-serif;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --brand: #5b9dff;
    --brand-strong: #8ab8ff;
    --brand-soft: rgba(91, 157, 255, .14);
    --accent: #60a5fa;
    --success: #60a5fa;
    --ink: #e5e7eb;
    --ink-2: #cbd5e1;
    --ink-3: #94a3b8;
    --bg: #0b1020;
    --surface: #111827;
    --surface-2: #151d2e;
    --border: #263147;
    --gradient: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --hero-bg: radial-gradient(1200px 600px at 10% -10%, rgba(59, 130, 246, .18), transparent 60%),
               radial-gradient(900px 500px at 100% 0%, rgba(59, 130, 246, .14), transparent 60%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, .55);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: var(--font-body); background: var(--bg); color: var(--ink); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color .3s, color .3s; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5rem; color: var(--ink); }
p { margin: 0 0 1rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 3000; background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600; border: 2px solid transparent; cursor: pointer; line-height: 1.2; transition: transform .2s var(--ease), box-shadow .2s, background-color .2s, color .2s, border-color .2s; text-decoration: none !important; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(10, 108, 255, .25); }
.btn-primary:hover { background: var(--brand-strong); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink); cursor: pointer; transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; text-decoration: none; }

/* ---------- Navigation ---------- */
.site-nav { position: fixed; inset: 0 0 auto 0; z-index: 1000; height: calc(var(--nav-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
    background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border); display: flex; align-items: center; transition: box-shadow .2s; }
.site-nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); font-family: var(--font-head); font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--gradient); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; letter-spacing: .02em; }
.nav-links { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: .5rem .75rem; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: .93rem; }
.nav-links a:hover, .nav-links a.active { color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.nav-toggle { display: none; }
@media (max-width: 1023.98px) {
    .nav-toggle { display: inline-flex; }
    .nav-cv .label { display: none; }
    .nav-links { position: fixed; top: calc(var(--nav-h) + env(safe-area-inset-top)); left: 0; right: 0; flex-direction: column; padding: .75rem 1rem 1.25rem;
        background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-8px);
        transition: opacity .2s, transform .2s, visibility .2s; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
    .nav-links.open { opacity: 1; visibility: visible; transform: none; }
    .nav-links a { padding: .85rem 1rem; border-radius: var(--radius-sm); }
}

/* ---------- Hero ---------- */
.hero { padding: calc(var(--nav-h) + 4rem) 0 4rem; background: var(--hero-bg); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .role { font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--ink-2); font-weight: 500; margin-bottom: 1rem; min-height: 1.6em; }
.hero .role .cursor { display: inline-block; width: 2px; height: 1.1em; background: var(--brand); vertical-align: -.15em; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero .summary { font-size: 1.08rem; color: var(--ink-2); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.fact-chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.fact-chips li { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); padding: .4rem .8rem; border-radius: 999px; }
.fact-chips i { color: var(--brand); }
.social { display: flex; gap: .6rem; flex-wrap: wrap; }
.hero-photo { position: relative; justify-self: center; width: min(360px, 80vw); aspect-ratio: 1; }
.hero-photo::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; background: var(--gradient); filter: blur(28px); opacity: .45; }
.hero-photo img { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 6px solid var(--surface-2); box-shadow: var(--shadow-lg); }
.hero-photo .badge-float { position: absolute; right: 4%; bottom: 8%; background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 14px; padding: .55rem .85rem; font-size: .85rem; font-weight: 600; display: flex; gap: .5rem; align-items: center; }
.hero-photo .badge-float i { color: var(--success); }
@media (max-width: 899.98px) {
    .hero { padding-top: calc(var(--nav-h) + 2rem); text-align: center; }
    .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-photo { order: -1; width: min(220px, 60vw); }
    .hero .summary { margin-inline: auto; }
    .hero-actions, .fact-chips, .social { justify-content: center; }
    .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section--alt { background: var(--surface); }
.section-head { margin-bottom: 2.5rem; max-width: 720px; }
.section-head.center { text-align: center; margin-inline: auto; }
.kicker { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: .4rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.section-head p { color: var(--ink-3); font-size: 1.05rem; margin: 0; }
.card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
@media (max-width: 767.98px) { .section { padding: 3.5rem 0; } }

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: start; }
.about-text p { color: var(--ink-2); font-size: 1.05rem; }
.side-card { padding: 1.5rem; }
.side-card h3 { font-size: 1.1rem; }
.interest { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.interest img { width: 84px; height: 84px; border-radius: 10px; background: #fff; padding: 4px; border: 1px solid var(--border); }
.edu-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.edu-mini li { display: flex; gap: .75rem; }
.edu-mini i { color: var(--brand); margin-top: .3rem; }
.edu-mini strong { display: block; font-size: .95rem; }
.edu-mini span { font-size: .85rem; color: var(--ink-3); }
@media (max-width: 899.98px) { .about-grid { grid-template-columns: 1fr; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3rem; }
.stat { text-align: center; padding: 1.5rem 1rem; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2.3rem; line-height: 1.1; }
.stat span { color: var(--ink-3); font-size: .92rem; }
@media (max-width: 767.98px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat strong { font-size: 1.9rem; } }

/* Skills */
.rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
.ring-card { padding: 1.5rem 1rem; text-align: center; }
.ring { position: relative; width: 120px; height: 120px; margin: 0 auto 1rem; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--border); }
.ring .fill { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset 1.4s var(--ease); }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-label strong { font-family: var(--font-head); font-size: 1.5rem; }
.ring-card h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.ring-card p { font-size: .88rem; color: var(--ink-3); margin-bottom: .75rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; }
.tag { font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.bars { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; }
.bar-skill { padding: 1.1rem 1.25rem; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.bar-head h3 { font-size: 1rem; margin: 0; }
.bar-head .lvl { font-size: .78rem; color: var(--ink-3); font-weight: 500; margin-left: .35rem; }
.bar-head b { color: var(--brand); font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--gradient); transition: width 1.3s var(--ease); }
.bar-skill p { font-size: .88rem; color: var(--ink-3); margin: .6rem 0 0; }
.toolbox { margin-top: 2.5rem; padding: 1.5rem; }
.toolbox h3 { font-size: 1.05rem; }
.toolbox .tags { justify-content: flex-start; }
.toolbox .tag { font-size: .85rem; padding: .35rem .8rem; background: var(--surface); color: var(--ink-2); border: 1px solid var(--border); }
@media (max-width: 899.98px) { .rings { grid-template-columns: repeat(2, 1fr); } .bars { grid-template-columns: 1fr; } }

/* Projects */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink-2); font-weight: 500; font-size: .9rem; cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .count { font-size: .75rem; opacity: .8; }
.chip[aria-pressed="true"] .count { opacity: 1; }
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.project { display: flex; flex-direction: column; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project[hidden] { display: none; }
.project-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); position: relative; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project:hover .project-media img { transform: scale(1.04); }
.project-media .ribbon { position: absolute; top: 12px; left: 12px; background: rgba(15, 23, 42, .78); color: #fff; font-size: .75rem; font-weight: 600; padding: .25rem .65rem; border-radius: 999px; backdrop-filter: blur(4px); }
.project-body { padding: 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.project-body h3 { font-size: 1.25rem; margin-bottom: .2rem; }
.project-sub { font-size: .9rem; color: var(--brand); font-weight: 600; margin-bottom: .75rem; }
.project-body > p { color: var(--ink-2); font-size: .97rem; }
.features { margin: 0 0 1rem; padding-left: 1.15rem; color: var(--ink-2); font-size: .92rem; }
.features li { margin: .25rem 0; }
.project .tags { justify-content: flex-start; margin-top: auto; margin-bottom: 1rem; }
.project-links { display: flex; gap: .6rem; flex-wrap: wrap; }
@media (max-width: 899.98px) { .projects { grid-template-columns: 1fr; } }

/* Timeline */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 1.75rem 2.5rem; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-2); border: 3px solid var(--brand); }
.timeline .when { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: .2rem .6rem; border-radius: 999px; margin-bottom: .4rem; }
.timeline h3 { font-size: 1.08rem; margin-bottom: .15rem; }
.timeline .where { font-size: .88rem; color: var(--ink-3); font-weight: 500; margin-bottom: .5rem; }
.timeline p, .timeline ul { color: var(--ink-2); font-size: .95rem; }
.timeline ul { padding-left: 1.1rem; margin: .25rem 0 0; }
.timeline ul li { padding: 0; margin: .25rem 0; }
.timeline ul li::before { display: none; }
@media (max-width: 899.98px) { .two-col { grid-template-columns: 1fr; gap: 1rem; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: start; }
.form-card { padding: clamp(1.25rem, 4vw, 2rem); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink-2); margin-bottom: .35rem; }
.input { width: 100%; padding: .8rem 1rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--ink); font-size: 1rem; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
textarea.input { min-height: 150px; resize: vertical; }
.alert { padding: .85rem 1rem; border-radius: 10px; font-size: .93rem; margin-top: 1rem; }
.alert.ok { background: rgba(10, 108, 255, .1); color: var(--success); }
.alert.err { background: rgba(220, 38, 38, .1); color: var(--danger); }
.contact-list { display: grid; gap: .9rem; }
.contact-item { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; }
.contact-item .ic { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.contact-item small { display: block; color: var(--ink-3); font-size: .8rem; }
.contact-item strong, .contact-item a { font-weight: 600; word-break: break-word; }
@media (max-width: 899.98px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .form-grid { grid-template-columns: 1fr; } .input { font-size: 16px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom)); color: var(--ink-3); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* Floating dock (chat + back to top) */
.dock { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 1100; display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.dock-btn { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); box-shadow: var(--shadow); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s; }
.dock-btn:hover { transform: translateY(-2px); }
.dock-btn[hidden] { display: none; }
.dock-chat { width: 60px; height: 60px; background: var(--gradient); color: #fff; font-size: 1.35rem; }

/* Toasts (used by the shared chat) */
.toast-stack { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2300; display: grid; gap: .5rem; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast-x { display: flex; gap: .75rem; align-items: center; padding: .85rem 1rem; border-radius: var(--radius); background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: .92rem; pointer-events: auto; }
.toast-x .toast-icon { flex: 0 0 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--brand); color: #fff; }
.toast-x.success .toast-icon { background: var(--success); }
.toast-x.error .toast-icon { background: var(--danger); }
.toast-x.leaving { opacity: 0; transition: opacity .25s; }

/* Motion */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}
@media print {
    .site-nav, .dock, .chat-panel, .filters, .hero-actions, #contact form { display: none !important; }
    .hero { padding-top: 1rem; }
    .reveal { opacity: 1 !important; transform: none !important; }
}
