/* =====================
   CSS VARIABLES + RESET
   ===================== */
:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --text: #111111;
  --text-muted: #6b6b6b;
  --accent: #c9472b;
  --border: #e5e2da;
  --btn-bg: #111111;
  --btn-hover: #2a2a2a;
  --radius: 6px;
  --shadow: 0 1px 4px rgba(0,0,0,0.07);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* =====================
   TYPOGRAPHY
   ===================== */
h1 { font-size: 2.2rem; font-weight: 700; line-height: 1.2; color: var(--text); }
h2 { font-size: 1.5rem; font-weight: 700; color: var(--text); }
h3 { font-size: 1.1rem; font-weight: 600; color: var(--text); }
p  { font-size: 0.95rem; line-height: 1.65; color: var(--text-muted); }

/* =====================
   NAVBAR
   ===================== */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.02em;
}

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

.nav-link {
  padding: 7px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: #f0ede7;
  color: var(--text);
}

.nav-link.active {
  background: var(--text);
  color: #ffffff;
}

/* =====================
   PAGE WRAPPER
   ===================== */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* =====================
   CARDS
   ===================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* =====================
   BUTTONS
   ===================== */
button, .btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  width: auto;
  background: var(--btn-bg);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

button:hover, .btn:hover {
  background: var(--btn-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: #f0ede7;
}

.btn-danger {
  background: var(--accent);
  color: #ffffff;
}

.btn-danger:hover {
  background: #b03a21;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.remove-btn {
  background: var(--accent);
  color: #ffffff;
  padding: 4px 10px;
  font-size: 0.8rem;
  width: auto;
}

.remove-btn:hover { background: #b03a21; }

/* =====================
   FORM ELEMENTS
   ===================== */
input:not([type="file"]),
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

input:not([type="file"]):focus,
textarea:focus,
select:focus {
  border-color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 90px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b6b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =====================
   UTILITIES
   ===================== */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.msg {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: #fafafa;
}

.msg.success {
  background: #f0faf5;
  border-color: #27ae60;
  color: #1e8449;
  display: block;
}

.msg.error {
  background: #fef6f5;
  border-color: var(--accent);
  color: var(--accent);
  display: block;
}

/* =====================
   LANDING PAGE — HERO
   ===================== */
.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.hero-text h1 {
  font-size: 2.8rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-text p {
  font-size: 1rem;
  margin-top: 16px;
  max-width: 480px;
}

.hero-text .hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.hero-image img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* =====================
   LANDING PAGE — SECTIONS
   ===================== */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.section:last-child { border-bottom: none; }

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

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

.skill-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
  margin-top: 20px;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* =====================
   SEARCH PAGE
   ===================== */
.search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.search-row input {
  max-width: 420px;
  margin-bottom: 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-group {
  position: relative;
}

.filter-toggle {
  height: 36px;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: auto;
}

.filter-toggle:hover {
  background: #f0ede7;
  color: var(--text);
}

.filter-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 100;
  min-width: 190px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  background: var(--surface);
  padding: 8px;
}

.filter-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 0.83rem;
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}

.filter-options label:hover { background: #f0ede7; }

.filter-options input[type="checkbox"],
.filter-options input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

#result-count {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* =====================
   FILE CARDS (SEARCH)
   ===================== */
.file-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s;
  margin-bottom: 12px;
}

.file-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.09); }

.file-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.file-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  font-size: 0.73rem;
  font-weight: 600;
  background: #f0ede7;
  color: var(--text-muted);
  border-radius: 20px;
  text-transform: none;
  letter-spacing: 0;
}

/* =====================
   UPLOAD PAGE
   ===================== */
.upload-form {
  max-width: 600px;
  margin: 0 auto;
}

.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s;
  margin-bottom: 12px;
}

.file-drop input[type="file"] { display: none; }

.file-drop:hover,
.file-drop.dragover {
  border-color: var(--text);
  color: var(--text);
}

.file-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0ede7;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 0.875rem;
}

.file-preview span:first-child { flex: 1; font-weight: 600; color: var(--text); }
.file-preview span:nth-child(2) { color: var(--text-muted); }

.progress-bar {
  background: var(--border);
  border-radius: 4px;
  height: 6px;
  margin-bottom: 6px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  background: var(--text);
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s;
}

#progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}

.back-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.back-link:hover { color: var(--text); }

/* =====================
   ACCOUNT PAGE
   ===================== */
.account-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.section-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-card-header h2 { margin: 0; }

/* =====================
   LOGIN PAGE
   ===================== */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 60px);
  padding: 40px 24px;
}

.login-card {
  width: 400px;
  max-width: 100%;
}

.login-card h2 {
  margin-bottom: 4px;
}

.login-card p {
  margin-bottom: 16px;
  font-size: 0.875rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 20px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* =====================
   CUSTOM ALERT
   ===================== */
#custom-alert-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#custom-alert-box {
  background: var(--surface);
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  width: 340px;
  max-width: 90vw;
  text-align: center;
  border-top: 3px solid var(--accent);
}

#custom-alert-box p {
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text);
}

#custom-alert-box button {
  padding: 10px 28px;
  background: var(--btn-bg);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  width: auto;
}

#custom-alert-box button:hover { background: var(--btn-hover); }

.alert-success { border-top-color: #27ae60; }
.alert-error   { border-top-color: var(--accent); }
.alert-info    { border-top-color: var(--text); }

/* =====================
   STAR RATING
   ===================== */
.stars span {
  color: var(--border);
  cursor: pointer;
  font-size: 1.1rem;
  transition: color 0.1s;
}

.stars span.filled,
.stars span:hover {
  color: #f59e0b;
}

/* =====================
   TOPBAR (legacy support)
   ===================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  padding: 12px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
