/* Modern, accessible, responsive portfolio styles */
:root {
  --bg: #0b0f14;
  --bg-elev: #10151c;
  --text: #e6edf3;
  --muted: #9fb1c3;
  --accent: #6aa2ff;
  --accent-2: #b56cff;
  --card: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --chip: rgba(255,255,255,0.08);
  --header-bg: var(--bg);
}

[data-theme="light"] {
  --bg: #f7fafc;
  --bg-elev: #ffffff;
  --text: #0b1220;
  --muted: #445164;
  --accent: #3b82f6;
  --accent-2: #a855f7;
  --card: rgba(0,0,0,0.03);
  --border: rgba(0,0,0,0.06);
  --chip: rgba(0,0,0,0.04);
  --header-bg: #ffffff;
}

/* Light theme tweaks to avoid visible stripes */
[data-theme="light"] body { background: var(--bg); }
[data-theme="light"] .hero-art .grid { display: none; }
[data-theme="light"] .site-header { background: var(--header-bg); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }
.section { padding: 44px 0; }
.section-title { font-size: clamp(22px, 3vw, 28px); margin: 0 0 18px; letter-spacing: 0.2px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}

.header-inner { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand-text { font-size: 16px; }
.nav { margin-left: auto; display: none; gap: 18px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--text); }
.theme-toggle { margin-left: 8px; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); display: grid; place-items: center; }
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(181, 108, 255, 0.2);
}
.theme-icon { width: 18px; height: 18px; display: inline-block; background: conic-gradient(from 0deg, var(--accent), var(--accent-2)); mask: radial-gradient(circle at 30% 30%, transparent 8px, black 8px); -webkit-mask: radial-gradient(circle at 30% 30%, transparent 8px, black 8px); border-radius: 50%; }
.theme-toggle:hover {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(106, 162, 255, 0.3);
}
.theme-icon { width: 18px; height: 18px; display: inline-block; background: conic-gradient(from 0deg, var(--accent), var(--accent-2)); mask: radial-gradient(circle at 30% 30%, transparent 8px, black 8px); -webkit-mask: radial-gradient(circle at 30% 30%, transparent 8px, black 8px); border-radius: 50%; }

@media (min-width: 860px) { .nav { display: flex; } }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(106, 162, 255, 0.2);
}
.hero .accent { display: block; font-weight: 700; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: clamp(16px, 2.4vw, 18px); margin: 0 0 18px; }
.cta { display: flex; gap: 12px; margin: 18px 0 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; }
.meta { list-style: none; padding: 0; margin: 14px 0 16px; color: var(--muted); }
.meta li { margin: 6px 0; }

.hero-art { position: relative; min-height: 220px; border-radius: 16px; border: 1px solid var(--border); background: var(--card); overflow: hidden; }
.orb { position: absolute; filter: blur(30px); opacity: 0.7; }
.orb-1 { width: 220px; height: 220px; background: radial-gradient(circle, var(--accent), transparent 60%); top: -40px; left: -40px; }
.orb-2 { width: 260px; height: 260px; background: radial-gradient(circle, var(--accent-2), transparent 60%); bottom: -60px; right: -60px; }
.grid { display: none; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.card { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.card h3 { margin: 4px 0 8px; font-size: 18px; }
.card p { margin: 0 0 10px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 10px; border-radius: 999px; background: var(--chip); border: 1px solid var(--border); font-size: 13px; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.timeline-item { position: relative; padding: 0 0 14px 18px; }
.timeline-item::before { content: ""; position: absolute; left: -7px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 0 4px rgba(255,255,255,0.05); }
.time { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.timeline h3 { margin: 4px 0 6px; font-size: 17px; }
.bullets { margin: 6px 0 0 18px; color: var(--muted); }

.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.project { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); display: grid; gap: 8px; }
.project-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.project h3 { margin: 0; font-size: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { border: 1px solid var(--border); background: var(--chip); padding: 4px 8px; border-radius: 999px; font-size: 12px; color: var(--muted); }
.links { display: flex; gap: 12px; }
.links a { color: var(--text); text-decoration: none; font-weight: 600; }
.links a:hover { text-decoration: underline; }

.contact { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.contact-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.contact-list li { display: flex; align-items: center; gap: 8px; }
.contact-list a { color: var(--text); text-decoration: none; }

.site-footer { margin-top: 28px; border-top: 1px solid var(--border); background: var(--bg-elev); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; color: var(--muted); }
.footer-links { display: flex; gap: 14px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

.reveal { opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s ease; }
.in-view { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .section { padding: 32px 0; }
  .cards, .project-grid { gap: 10px; }
}
