/* =========================================================
   joshuahernandez.tech — Site Styles
   ========================================================= */

/* ---------- Variables ---------- */
:root {
  --primary:        #1D4ED8;
  --primary-dark:   #1E3A8A;
  --primary-light:  #DBEAFE;
  --accent:         #F59E0B;
  --accent-dark:    #D97706;
  --bg:             #F1F5F9;
  --surface:        #FFFFFF;
  --text:           #1E293B;
  --text-muted:     #64748B;
  --border:         #E2E8F0;
  --hover-bg:       #EFF6FF;
  --sidebar-w:      265px;
  --nav-h:          60px;
  --font:           'Inter', system-ui, -apple-system, sans-serif;
  --radius:         8px;
  --shadow:         0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ---------- Shared Nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--primary-dark);
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  z-index: 200;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.nav-brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  text-decoration: none;
  margin-right: auto;
  letter-spacing: -0.01em;
}
.nav-brand .accent { color: #CBD5E1; }
.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: rgba(255,255,255,0.12); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(255,255,255,0.18); color: #fff; }
.nav-link.btn-nav {
  background: var(--accent);
  color: #1E293B;
  font-weight: 700;
  margin-left: 0.5rem;
}
.nav-link.btn-nav:hover { background: var(--accent-dark); }

/* ---------- Site Footer ---------- */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 1.4rem 1rem;
  font-size: 0.8rem;
}
.site-footer a { color: var(--accent); }
.site-footer a:hover { color: #FDE68A; }

/* =========================================================
   NOTES PAGE (index.html)
   ========================================================= */

.notes-layout {
  display: flex;
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}

/* ----- Sidebar ----- */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 9999px; }

.sidebar-top {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-top h2 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.sidebar-search {
  width: 100%;
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sidebar-search::placeholder { color: var(--text-muted); }
.sidebar-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.12);
}
.sidebar-search-clear {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 0.35rem;
  display: none;
}
.sidebar-search-clear.visible { display: block; }

.category-nav { flex: 1; padding: 0.5rem 0; }

.cat-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 1rem;
  cursor: pointer;
  font-size: 0.865rem;
  font-weight: 500;
  color: var(--text);
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  user-select: none;
  line-height: 1.3;
}
.cat-item:hover { background: var(--hover-bg); }
.cat-item.active {
  background: var(--hover-bg);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}
.cat-icon { font-size: 1.05rem; flex-shrink: 0; }
.cat-label { flex: 1; }
.cat-count {
  font-size: 0.72rem;
  background: var(--border);
  color: var(--text-muted);
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-weight: 700;
  flex-shrink: 0;
}
.cat-item.active .cat-count {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ----- Main Content Area ----- */
.content-area {
  flex: 1;
  padding: 2rem 2.25rem;
  min-width: 0;
}

.content-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}
.content-header h1 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.content-header p {
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-size: 0.88rem;
}

/* Overview grid */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.overview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.12s, border-color 0.15s;
}
.overview-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--primary);
}
.overview-card-icon { font-size: 2rem; margin-bottom: 0.4rem; line-height: 1; color: var(--primary); }
.overview-card-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.2rem; }
.overview-card-count { font-size: 0.78rem; color: var(--primary); font-weight: 600; }
.overview-card-subs { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.4rem; line-height: 1.5; }

/* Category detail view */
.subcategory-section { margin-bottom: 2rem; }
.subcategory-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sub-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  background: var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
}
.tutorial-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tutorial-link {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.tutorial-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}

/* Search */
.search-group { margin-bottom: 1.5rem; }
.search-group-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.no-results {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem 0;
}

/* =========================================================
   RESUME PAGE (resume.html)
   ========================================================= */

.resume-page { margin-top: var(--nav-h); }

/* Hero */
.resume-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #2563EB 100%);
  color: #fff;
  padding: 4rem 2rem 3.5rem;
}
.resume-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 3rem;
  align-items: center;
}
.resume-photo {
  width: 155px;
  height: 155px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 3.5rem;
  position: relative;
}
.resume-photo img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 40% center;
  border-radius: 50%;
}
.resume-info { flex: 1; }
.resume-name {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.resume-title {
  font-size: 1.05rem;
  opacity: 0.88;
  margin: 0.35rem 0 1rem;
  font-style: italic;
}
.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  font-size: 0.84rem;
  opacity: 0.82;
  margin-bottom: 1.4rem;
}
.resume-contact a { color: rgba(255,255,255,0.9); }
.resume-contact a:hover { color: #fff; }
.resume-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.3rem;
  background: var(--accent);
  color: #1E293B;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.btn-hero-primary:hover { background: var(--accent-dark); transform: translateY(-1px); text-decoration: none; }

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.3rem;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.3);
  transition: background 0.15s;
}
.btn-hero-secondary:hover { background: rgba(255,255,255,0.22); text-decoration: none; }

/* Resume sections */
.resume-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}
.resume-section { margin-bottom: 3rem; }
.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 1.4rem;
  display: inline-block;
}

/* Summary */
.summary-text {
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 760px;
}

/* Competencies badges */
.badge-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.badge {
  padding: 0.32rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid #BFDBFE;
}
.badge.amber {
  background: #FFFBEB;
  color: #92400E;
  border-color: #FDE68A;
}
.badge.slate {
  background: #F8FAFC;
  color: var(--text);
  border-color: var(--border);
}

/* Experience timeline */
.exp-list { display: flex; flex-direction: column; gap: 2.25rem; }
.exp-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1.5rem;
  position: relative;
}
.exp-meta { text-align: right; padding-top: 0.15rem; }
.exp-dates { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.exp-location { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.2rem; }
.exp-body {
  border-left: 3px solid var(--border);
  padding-left: 1.4rem;
  position: relative;
}
.exp-body::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--primary);
}
.exp-role { font-size: 1rem; font-weight: 700; color: var(--text); }
.exp-company { font-size: 0.9rem; color: var(--primary); font-weight: 600; margin-bottom: 0.6rem; }
.exp-bullets { padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.exp-bullets li {
  font-size: 0.875rem;
  color: var(--text);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.55;
}
.exp-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-size: 0.78rem;
  line-height: 1.7;
}

/* Education */
.edu-list { display: flex; flex-direction: column; gap: 1.4rem; }
.edu-item {}
.edu-degree { font-size: 0.97rem; font-weight: 700; color: var(--text); }
.edu-school { font-size: 0.9rem; color: var(--primary); font-weight: 600; margin-top: 0.1rem; }
.edu-detail { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; line-height: 1.5; }

/* Technical skills table */
.tech-grid { display: flex; flex-direction: column; gap: 1rem; }
.tech-row { display: flex; align-items: flex-start; gap: 1rem; }
.tech-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 160px;
  flex-shrink: 0;
  padding-top: 0.28rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tech-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Contact form */
.contact-wrapper { display: flex; gap: 3rem; align-items: flex-start; flex-wrap: wrap; }
.contact-info { flex-shrink: 0; }
.contact-info p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.75rem; max-width: 250px; }
.contact-info a { font-size: 0.88rem; display: block; margin-bottom: 0.4rem; }

.contact-form { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.form-input, .form-textarea {
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.1);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.5rem;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s, transform 0.1s;
  align-self: flex-start;
}
.form-submit:hover { background: var(--primary-dark); transform: translateY(-1px); }
.form-note { font-size: 0.75rem; color: var(--text-muted); }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .exp-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .exp-meta { text-align: left; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 100%; }

  .notes-layout { flex-direction: column; }
  .sidebar {
    position: static;
    height: auto;
    max-height: 280px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .content-area { padding: 1.25rem 1rem; }

  .resume-hero-inner { flex-direction: column; text-align: center; }
  .resume-name { font-size: 2rem; }
  .resume-contact { justify-content: center; }
  .resume-actions { justify-content: center; }
  .resume-content { padding: 2rem 1rem 3rem; }
  .tech-row { flex-direction: column; gap: 0.4rem; }
  .tech-label { width: auto; }
}

@media (max-width: 480px) {
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { padding: 0 1rem; }
  .nav-brand { font-size: 1rem; }
}
