/* Modern, clean baseline */
:root {
  --bg: #ffffff;
  --text: #0f172a; /* slate-900 */
  --muted: #475569; /* slate-600 */
  --surface: #f1f5f9; /* slate-100 */
  --accent: #2563eb; /* blue-600 */
  --accent-contrast: #ffffff;
  --border: #e2e8f0; /* slate-200 */
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; /* near-slate-950 */
    --text: #e2e8f0; /* slate-200 */
    --muted: #94a3b8; /* slate-400 */
    --surface: #0f172a; /* slate-900 */
    --accent: #60a5fa; /* blue-400 */
    --accent-contrast: #0b1220;
    --border: #1f2937; /* gray-800 */
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.35);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
  text-decoration: none;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  position: relative;
}
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: color-mix(in oklab, var(--accent) 70%, transparent); transform: scaleX(0); transform-origin: left; transition: transform 160ms ease; }
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }
.theme-toggle { margin-left: 12px; height: 36px; padding: 0 10px; min-width: 40px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.theme-toggle:hover { color: var(--text); background: color-mix(in oklab, var(--surface) 80%, transparent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-label { font-size: 0.92rem; }
.theme-toggle span { transition: opacity 160ms ease, transform 160ms ease; }

/* Hero */
.hero {
  padding: 36px 0 28px;
}
.hero-inner { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; }
.hero .subtitle {
  color: var(--muted);
  margin-top: 8px;
}
.hero .avatar { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); border: 1px solid var(--border); background: var(--surface); }
@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero .avatar { width: 120px; height: 120px; }
}
.cta { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
  box-shadow: var(--shadow);
}
.btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border));
  box-shadow: 0 4px 16px rgba(0,0,0,0.10), var(--shadow);
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: color-mix(in oklab, var(--accent) 65%, var(--border));
}
.btn.primary:hover {
  border-color: color-mix(in oklab, var(--accent) 75%, var(--border));
  box-shadow: 0 6px 24px color-mix(in oklab, var(--accent) 30%, transparent), var(--shadow);
}

/* Sections */
section {
  scroll-margin-top: 80px;
}
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-header h2 { position: relative; }
html[data-theme="light"] .section-header h2::after { content: ""; display: block; width: 48px; height: 3px; margin-top: 6px; border-radius: 2px; background: color-mix(in oklab, var(--accent) 80%, transparent); }
.muted { color: var(--muted); }
.inline-link { color: var(--accent); text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

/* Experience card */
.experience-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }
.exp-content { min-width: 0; transition: opacity 220ms ease; }
.exp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.exp-line1 { font-weight: 600; }
.exp-line2 { color: var(--muted); }
.exp-dates { color: var(--muted); font-size: 0.92rem; white-space: nowrap; }
.exp-nav { height: 36px; width: 36px; border-radius: 999px; border: 1px solid var(--border); background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); }
.exp-nav:hover { color: var(--text); background: color-mix(in oklab, var(--surface) 80%, transparent); }

/* Projects grid */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
}
.card {
  grid-column: span 4;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.card:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--accent) 40%, var(--border)); box-shadow: 0 6px 24px rgba(0,0,0,0.12), var(--shadow); }
@media (max-width: 720px) {
  .card { grid-column: span 6; }
}
.card h3 { margin: 0; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); }
.card .meta { font-size: 0.9rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.card a {
  margin-top: auto; /* push the link to the bottom for uniform alignment */
  color: var(--accent);
  text-decoration: none;
}
.card a:hover { text-decoration: underline; }

/* Contact and footer */
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform 120ms ease, box-shadow 120ms ease; }
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 30%, transparent), var(--shadow); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-btn span { line-height: 1; }

/* Brand hover states */
.icon-btn[data-brand="linkedin"]:hover { color: #0a66c2; border-color: color-mix(in oklab, #0a66c2 40%, var(--border)); background: color-mix(in oklab, #0a66c2 14%, var(--surface)); }
.icon-btn[data-brand="github"]:hover { color: #f0f6fc; border-color: #30363d; background: #24292f; }
.icon-btn[data-brand="instagram"]:hover { color: #e1306c; border-color: color-mix(in oklab, #e1306c 40%, var(--border)); background: color-mix(in oklab, #e1306c 14%, var(--surface)); }
.icon-btn[data-brand="email"]:hover { color: #ea4335; border-color: color-mix(in oklab, #ea4335 40%, var(--border)); background: color-mix(in oklab, #ea4335 14%, var(--surface)); }
.icon-btn[data-brand="phone"]:hover { color: #16a34a; border-color: color-mix(in oklab, #16a34a 40%, var(--border)); background: color-mix(in oklab, #16a34a 14%, var(--surface)); }

/* legacy list styles retained for compatibility (unused) */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.contact-list a { color: var(--accent); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  margin-top: 20px;
}

/* Utilities */
.hidden { display: none; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 420ms ease, transform 420ms ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Theme overrides (manual) */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --surface: #f8fafc;
  --accent: #2563eb;
  --accent-contrast: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.05);
}
html[data-theme="light"] .hero { background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 7%, transparent) 0%, transparent 60%); }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --surface: #0f172a;
  --accent: #60a5fa;
  --accent-contrast: #0b1220;
  --border: #1f2937;
  --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.35);
}

/* Stats */
.stats { margin-top: 10px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; padding: 0; list-style: none; font-size: 0.95rem; }
.stats .badge { background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 4px 8px; box-shadow: none; color: var(--muted); }

