/* ---------- Colors: navy by default, light mode swaps them ---------- */
:root {
  --bg: #0a1628;
  --bg-glow: #13284a;
  --surface: #0f1f38;
  --text: #e8eef7;
  --muted: #8da2c0;
  --border: #1e3352;
  --accent: #7cc4fa;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f8fc;
  --bg-glow: #e3ecf8;
  --surface: #ffffff;
  --text: #0a1628;
  --muted: #5b6b85;
  --border: #dbe3ef;
  --accent: #1d4ed8;
  color-scheme: light;
}

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

/* ---------- Page column ---------- */
html, body {
  background: var(--bg);
  background-image: radial-gradient(ellipse 900px 520px at 50% -120px, var(--bg-glow), transparent 70%);
  background-repeat: no-repeat;
  min-height: 100%;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background: transparent;
}

/* Content column; the header bar runs edge to edge */
main,
footer,
.container {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

main {
  padding-top: 56px;
  padding-bottom: 24px;
  line-height: 1.65;
}

/* ---------- Header + nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); border-bottom-color: var(--accent); }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  width: 30px;
  height: 30px;
  cursor: pointer;
  font: inherit;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }

/* ---------- Text ---------- */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 2.4rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
h3 { font-size: 1rem; margin: 0 0 8px; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

.summary { color: var(--muted); font-size: 1.1rem; max-width: 620px; margin-top: 16px; }

/* Small mono section headings, e.g. "ABOUT" */
.label {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 48px 0 12px;
}

/* ---------- Intro ---------- */
.intro {
  display: flex;
  align-items: center;
  gap: 24px;
}

.avatar {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  font-size: 1.6rem;
  font-weight: 600;
}

.role { font-size: 1.15rem; font-weight: 500; margin: 0; }
.location { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); margin: 4px 0 0; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--text);
}
.btn:hover { text-decoration: none; opacity: 0.85; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--muted); opacity: 1; }

/* ---------- Boxes ---------- */
.box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags li {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
}

/* Rows with a title on the left and details on the right */
.work-list { list-style: none; padding: 0; margin: 0; }
.work-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.work-list li:first-child { padding-top: 0; }
.work-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.work-list span { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }

/* ---------- Placeholders (delete once you add real images/videos) ---------- */
.placeholder {
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
}

/* ---------- Coding cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { text-decoration: none; border-color: var(--muted); transform: translateY(-2px); }
.card:hover .card-title { color: var(--accent); }

.card-image {
  aspect-ratio: 16 / 9;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  object-fit: cover;
}

.card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-content p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card-title { margin: 0; font-size: 1.05rem; }
.card-meta { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin-top: auto; }

/* ---------- Editing videos ---------- */
.video-list { display: grid; gap: 28px; margin-top: 32px; }
.label + .video-list { margin-top: 0; }

.video-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-bottom: 1px solid var(--border);
  display: block;
}
.video-player.placeholder { display: grid; border-style: none none dashed; }

/* Vertical videos (Shorts, TikTok) sit three across */
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.short-player {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 0;
  border-bottom: 1px solid var(--border);
  display: block;
  background: var(--bg);
}

.shorts-grid .video-info { padding: 14px 16px 16px; }
.shorts-grid .video-info h3 { font-size: 0.95rem; }
.shorts-grid .video-info p { font-size: 0.9rem; }

.video-info { padding: 18px 22px 20px; }
.video-info p { color: var(--muted); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding-top: 24px;
  padding-bottom: 40px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Phones ---------- */
@media (max-width: 600px) {
  main { padding-top: 36px; }
  h1 { font-size: 2rem; }
  .nav-links { gap: 14px; }
  .intro { flex-direction: column; align-items: flex-start; gap: 16px; }
  .avatar { width: 80px; height: 80px; }
}

/* Small label above a card title, e.g. "Web app" */
.card-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Soft navy shadow when hovering cards */
.card:hover,
.video-entry:hover { box-shadow: 0 12px 32px -12px rgb(3 10 25 / 0.55); }
:root[data-theme="light"] .card:hover,
:root[data-theme="light"] .video-entry:hover { box-shadow: 0 12px 32px -14px rgb(10 22 40 / 0.18); }
.video-entry { transition: box-shadow 0.15s; }

/* ---------- Setup: fastfetch-style terminal cards ---------- */
.setup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.terminal {
  background: #070f1d;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  color: #d6e2f3;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0d1a30;
  border-bottom: 1px solid #1e3352;
}
.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
}
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }
.terminal-bar em {
  margin-left: 8px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #8da2c0;
}

.terminal pre {
  margin: 0;
  padding: 16px 18px 18px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
}
.terminal b { color: #7cc4fa; font-weight: 500; }
.terminal .prompt { color: #86efac; }
.terminal .dim { color: #6b7f9e; }
