/* styles.css — shared design system for portfolio */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0c0c0c;
  --surface: #111111;
  --border: #1e1e1e;
  --text: #ffffff;
  --text-secondary: #777777;
  --text-muted: #444444;
  --orange: #e8683a;
  --yellow: #f0c040;
  --green: #4a8c50;
  --magenta: #d43d82;
  --gradient: linear-gradient(90deg, #e8683a 0%, #f0c040 33%, #4a8c50 66%, #d43d82 100%);
  --nav-height: 64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─── NAV ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.wordmark {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.card.clickable { cursor: pointer; }
.card.clickable:hover { border-color: #333; }

.card.external { cursor: pointer; }
.card.external:hover { border-color: #333; }

.card.wip { opacity: 0.45; cursor: default; }

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background-size: cover;
  background-position: center top;
}

.thumb-design    { background: linear-gradient(145deg, #1c0c08, #2e1610); }
.thumb-community { background: linear-gradient(145deg, #1c0810, #2e1020); }
.thumb-code      { background: linear-gradient(145deg, #1a1608, #2a2010); }
.thumb-cs-orange { background: linear-gradient(145deg, #1c0c08, #2e1610); }
.thumb-cs-green  { background: linear-gradient(145deg, #0c1a10, #122a1c); }

.thumb-photo {
  background-size: cover;
  background-position: center top;
}

.thumb-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.32) 100%);
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid;
  backdrop-filter: blur(4px);
}

.card-body { padding: 14px 16px 18px; }

.card-discipline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.3;
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.card-tag {
  display: inline-block;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  border: 1px solid #333;
  color: #999;
  line-height: 1;
}

/* ─── SHARED LAYOUT UTILITIES ─── */
.gradient-rule {
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 18px;
}

.btn-outline {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 3px;
  border: 1px solid #333;
  color: var(--text-secondary);
  transition: border-color 0.15s, color 0.15s;
}
.btn-outline:hover { border-color: #666; color: var(--text); }

/* ─── PASSWORD MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 12, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: relative;
  background: var(--surface);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--text); }

.modal-title { font-size: 17px; font-weight: 600; }

.modal-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 16px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  margin-top: 4px;
}
.modal-input:focus { border-color: #555; }

.modal-submit {
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
  transition: opacity 0.15s;
}
.modal-submit:hover { opacity: 0.85; }

.modal-error {
  font-size: 14px;
  color: var(--orange);
  min-height: 16px;
}

/* ─── FOOTER ─── */
.footer {
  padding: 28px 48px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy { font-size: 12px; color: var(--text-muted); }

.contact-link {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.contact-link:hover { color: var(--text); }

/* ─── BACK BUTTON ─── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.15s;
  margin-bottom: 32px;
}
.back-btn:hover { color: var(--text-secondary); }
