/* Minimal, fast, GitHub-Pages-friendly. Humans love drama; CSS doesn't. */

:root {
  --bg: #f7f8fb;
  --text: #2d2d2d;
  --muted: rgba(0, 0, 0, 0.55);
  --card: rgba(255, 255, 255, 0.0);
  --card-hover: #ffffff;
  --border: rgba(0, 0, 0, 0.10);
  --shadow: rgba(0, 0, 0, 0.08);
  --link: #0249cd;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg);
  color: var(--text);

  /* Make room for fixed footer so it doesn't overlap content */
  padding-bottom: 54px;
}

a { color: var(--link); text-decoration: none; font-size: 0.92rem; font-weight: 600; }
a:hover { text-decoration: underline; }

.app {
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 980px;
  padding: 24px 0 40px;
}

@media (max-width: 980px) {
  .container { padding: 24px 40px 40px; }
}

/* ===== Top Tabs ===== */
.topbar {
  display: flex;
  justify-content: flex-end;
  padding: 6px 0 18px;
}

.nav-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab {
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.7);
  color: #1e1e1e;
  text-decoration: none;
}

.tab:hover {
  background: #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  text-decoration: none;
}

/* ===== Sidebar + main ===== */
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.85);
}

.name {
  margin: 14px 0 6px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.role {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 0.95rem;
}

/* Social icons */
.socials {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.social-link {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.7);
}

.social-link:hover {
  background: #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  text-decoration: none;
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: #222;
}

.main {
  font-size: 0.95rem;
}

.subtitle {
  margin: 6px 0 40px;
  line-height: 1.35;
}

.section-title { margin: 10px 0 4px; }
.section-subtitle { margin: 0; color: var(--muted); }

/* Responsive: stack columns */
@media (max-width: 900px) {
  .topbar { justify-content: center; }

  .layout {
    grid-template-columns: 1fr;
  }
}

/* ===== Projects grid ===== */
.projects {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
}

.project-card {
  flex: 1 1 calc(33.333% - 20px);
  min-width: 250px;
  min-height: 300px;
  padding: 20px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 0 rgba(0,0,0,0), inset 0 0 0 1px var(--border);
  background: var(--card);
  transition: background 0.25s ease, box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card:hover, .project-card:focus-within {
  background: var(--card-hover);
  box-shadow: 0 0 10px var(--shadow), inset 0 0 0 2px #fff;
  transform: translateY(-1px);
}

.project-img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.6);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-title { margin: 0; font-size: 1.02rem; }
.project-desc { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.3; }

/* ===== Fixed footer ===== */
.site-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  text-align: center;

  padding: 12px 10px;
  font-size: 0.9rem;
  color: rgba(0,0,0,0.55);

  background: rgba(247, 248, 251, 0.92);
  border-top: 1px solid rgba(0,0,0,0.08);
  z-index: 999;
}

/* ===== Modal ===== */
.modal {
  opacity: 0;
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
}

.modal[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
  z-index: 1000;
}

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.80);
}

.modal-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  width: 90%;
  max-width: 540px;
  max-height: 85vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: rgba(0,0,0,0.14) 0 6px 16px;
  overflow: hidden;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.modal[data-open="true"] .modal-card {
  transform: translate(-50%, -50%);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
  gap: 12px;
}

.modal-header h2 { margin: 0; font-size: 1.1rem; }

.modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  color: #333;
}

.modal-body {
  padding: 0 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  max-height: calc(85vh - 64px);
}

.modal-body img, .modal-body video {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.modal-body p { margin: 0; line-height: 1.35; color: var(--text); }
.modal-body .meta { color: var(--muted); font-size: 0.88rem; }
