/*
 * Custom Styles — Bao Nguyen Portfolio
 * White/Blue Professional Theme (Light) + Midnight & Gold (Dark)
 * Loaded after main.css to override Strata template defaults.
 */

/* ============================================
   SMOOTH TRANSITIONS FOR THEME SWITCHING
   ============================================ */

body,
#header,
#main,
#main > section,
#footer,
.project-card,
.education-block,
.contact-card,
.experience-item,
.skills-category h4,
.skill-tags span,
.skill-tags span.cert,
.button,
.button.primary,
h1, h2, h3, h4,
p, strong, b, a, li {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ============================================
   TYPOGRAPHY — Cormorant Garamond for Headings
   ============================================ */

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  color: #111827;
}

/* ============================================
   GLOBAL COLOR OVERRIDES
   ============================================ */

body {
  color: #6b7280;
}

strong, b {
  color: #111827;
}

p {
  color: #6b7280;
}

a {
  color: #2563eb;
}

a:hover {
  color: #1d4ed8;
}

#main > section {
  border-top-color: #e5e7eb;
}

/* ============================================
   SMOOTH SCROLL
   ============================================ */

html {
  scroll-behavior: smooth;
}

/* ============================================
   FORM INPUTS
   ============================================ */

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  border-color: #2563eb;
}

/* ============================================
   BUTTONS
   ============================================ */

.button:hover {
  border-color: #2563eb;
  color: #2563eb !important;
}

.button:active {
  background-color: rgba(37, 99, 235, 0.1);
  border-color: #2563eb;
  color: #2563eb !important;
}

.button.primary {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #fff !important;
}

.button.primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

.button.primary:active {
  background-color: #1e40af;
  border-color: #1e40af;
}

input[type="submit"],
input[type="reset"],
input[type="button"] {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #fff !important;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active {
  background-color: #1e40af;
  border-color: #1e40af;
}

input[type="checkbox"]:checked + label::before,
input[type="radio"]:checked + label::before {
  background: #2563eb;
  border-color: #2563eb;
}

/* ============================================
   SIDEBAR / HEADER
   ============================================ */

#header {
  background-color: #111827;
  background-image: none;
}

#header .sidebar-icons {
  margin-top: 1em;
}

#header .sidebar-icons li a {
  color: rgba(255, 255, 255, 0.5);
}

#header .sidebar-icons li a:hover {
  color: rgba(255, 255, 255, 1);
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */

.theme-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0.4em 0.6em;
  border-radius: 0.3em;
  font-size: 0.85em;
  margin-top: 1em;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

.theme-toggle:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */

.sidebar-nav {
  margin-top: 1.5em;
}

.sidebar-nav a {
  display: block;
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  border-bottom: none;
  padding: 0.4em 0;
  transition: color 0.2s ease;
}

.sidebar-nav a:hover {
  color: #fff;
}

@media screen and (max-width: 980px) {
  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25em 1.5em;
    margin-top: 1em;
  }

  .sidebar-nav a {
    display: inline-block;
  }

  .theme-toggle {
    margin-top: 0.75em;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */

#one header.major h1 {
  font-size: 2.5em;
  margin-bottom: 0.1em;
  color: #111827;
}

#one header.major h2 {
  font-size: 1.1em;
  color: #6b7280;
  font-weight: 400;
  letter-spacing: 0.05em;
  font-family: 'Source Sans Pro', Helvetica, sans-serif;
}

/* ============================================
   PROJECT CARDS
   ============================================ */

.project-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5em;
  padding: 1.75em;
  margin-bottom: 2em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: #2563eb;
}

.project-card .category-tag {
  display: inline-block;
  font-size: 0.7em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  padding: 0.3em 0.8em;
  border-radius: 0.25em;
  margin-bottom: 0.75em;
}

.project-card h3 {
  font-size: 1.1em;
  margin-bottom: 0.5em;
  color: #111827;
}

.project-card p {
  font-size: 0.85em;
  line-height: 1.65;
  color: #6b7280;
  margin-bottom: 1em;
}

.project-card .tool-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-bottom: 1em;
}

.project-card .tool-badges span {
  font-size: 0.7em;
  background: #f0f0f0;
  color: #555;
  padding: 0.25em 0.6em;
  border-radius: 0.2em;
}

.project-card .key-finding {
  font-size: 0.85em;
  font-style: italic;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.04);
  padding: 0.75em 1em;
  border-left: 3px solid #2563eb;
  border-radius: 0 0.25em 0.25em 0;
  margin-bottom: 1em;
}

.project-card .project-link {
  font-size: 0.8em;
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */

.experience-item {
  margin-bottom: 2em;
  padding-left: 1.5em;
  border-left: 3px solid #2563eb;
}

.experience-item .exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.25em;
}

.experience-item h4 {
  font-size: 1em;
  color: #111827;
  margin: 0;
}

.experience-item .exp-dates {
  font-size: 0.8em;
  color: #9ca3af;
}

.experience-item .exp-company {
  font-size: 0.85em;
  color: #2563eb;
  margin-bottom: 0.5em;
}

.experience-item p {
  font-size: 0.85em;
  line-height: 1.65;
  color: #6b7280;
  margin: 0;
}

/* ============================================
   EDUCATION SECTION
   ============================================ */

.education-block {
  padding: 1.5em;
  background: #f8fafc;
  border-radius: 0.5em;
  border: 1px solid #e5e7eb;
  margin-bottom: 2em;
}

.education-block h4 {
  color: #111827;
  margin-bottom: 0.25em;
}

.education-block .edu-meta {
  font-size: 0.85em;
  color: #6b7280;
  margin-bottom: 0.75em;
}

.education-block .coursework {
  font-size: 0.8em;
  color: #6b7280;
  line-height: 1.75;
}

/* ============================================
   SKILLS SECTION
   ============================================ */

.skills-category {
  margin-bottom: 2em;
}

.skills-category h4 {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2563eb;
  margin-bottom: 0.75em;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5em;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.skill-tags span {
  font-size: 0.8em;
  background: #f5f7fa;
  color: #444;
  padding: 0.35em 0.85em;
  border-radius: 0.3em;
  border: 1px solid #e0e4ea;
}

.skill-tags span.cert {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.2);
  font-weight: 600;
}

/* ============================================
   CONTACT CARD GRID
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25em;
}

.contact-card {
  display: flex;
  align-items: center;
  padding: 1.25em 1.5em;
  background: #f8fafc;
  border: 1px solid #e0e4ea;
  border-radius: 0.5em;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  border-color: #2563eb;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.contact-card-icon {
  font-size: 1.5em;
  color: #2563eb;
  width: 1.75em;
  flex-shrink: 0;
}

.contact-card-text {
  display: flex;
  flex-direction: column;
}

.contact-card-label {
  font-size: 0.65em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 0.25em;
}

.contact-card-value {
  font-size: 0.9em;
  color: #333;
}

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

@media screen and (max-width: 980px) {
  #header .sidebar-icons {
    margin-top: 0.75em;
  }
}

@media screen and (max-width: 736px) {
  .experience-item .exp-header {
    flex-direction: column;
  }

  .experience-item .exp-dates {
    margin-bottom: 0.25em;
  }

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

/* ================================================================
   ================================================================
   DARK MODE — Midnight & Gold
   All overrides scoped under body.dark-mode
   ================================================================
   ================================================================ */

/* --- Global --- */

body.dark-mode {
  background-color: #1a1a2e;
  color: #9a9ab5;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: #ffffff;
}

body.dark-mode strong,
body.dark-mode b {
  color: #ffffff;
}

body.dark-mode p {
  color: #9a9ab5;
}

body.dark-mode li {
  color: #9a9ab5;
}

body.dark-mode a {
  color: #e2b04a;
}

body.dark-mode a:hover {
  color: #f0c665;
}

body.dark-mode #main > section {
  border-top-color: rgba(226, 176, 74, 0.2);
}

/* --- Sidebar --- */

body.dark-mode #header {
  background-color: rgba(15, 15, 30, 0.92);
}

body.dark-mode .sidebar-nav a:hover {
  color: #e2b04a;
}

body.dark-mode #header .sidebar-icons li a:hover {
  color: #e2b04a;
}

body.dark-mode .theme-toggle:hover {
  color: #e2b04a;
  border-color: rgba(226, 176, 74, 0.5);
}

/* --- Buttons --- */

body.dark-mode .button {
  border-color: rgba(226, 176, 74, 0.3);
  color: #9a9ab5 !important;
}

body.dark-mode .button:hover {
  border-color: #e2b04a;
  color: #e2b04a !important;
}

body.dark-mode .button:active {
  background-color: rgba(226, 176, 74, 0.1);
  border-color: #e2b04a;
  color: #e2b04a !important;
}

body.dark-mode .button.primary {
  background-color: #e2b04a;
  border-color: #e2b04a;
  color: #1a1a2e !important;
}

body.dark-mode .button.primary:hover {
  background-color: #f0c665;
  border-color: #f0c665;
}

body.dark-mode .button.primary:active {
  background-color: #c99a3a;
  border-color: #c99a3a;
}

body.dark-mode input[type="submit"],
body.dark-mode input[type="reset"],
body.dark-mode input[type="button"] {
  background-color: #e2b04a;
  border-color: #e2b04a;
  color: #1a1a2e !important;
}

body.dark-mode input[type="submit"]:hover,
body.dark-mode input[type="reset"]:hover,
body.dark-mode input[type="button"]:hover {
  background-color: #f0c665;
  border-color: #f0c665;
}

/* --- Form Inputs --- */

body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode textarea,
body.dark-mode select {
  background: rgba(22, 33, 62, 0.6);
  color: #9a9ab5;
  border-color: rgba(226, 176, 74, 0.2);
}

body.dark-mode input[type="text"]:focus,
body.dark-mode input[type="email"]:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
  border-color: #e2b04a;
}

/* --- Hero --- */

body.dark-mode #one header.major h1 {
  color: #ffffff;
}

body.dark-mode #one header.major h2 {
  color: #9a9ab5;
}

/* --- Project Cards --- */

body.dark-mode .project-card {
  background: rgba(22, 33, 62, 0.6);
  border-color: rgba(226, 176, 74, 0.2);
}

body.dark-mode .project-card:hover {
  border-color: rgba(226, 176, 74, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .project-card .category-tag {
  color: #e2b04a;
  background: rgba(226, 176, 74, 0.1);
}

body.dark-mode .project-card h3 {
  color: #ffffff;
}

body.dark-mode .project-card p {
  color: #9a9ab5;
}

body.dark-mode .project-card .tool-badges span {
  background: rgba(226, 176, 74, 0.08);
  color: #9a9ab5;
}

body.dark-mode .project-card .key-finding {
  color: #e2b04a;
  background: rgba(226, 176, 74, 0.06);
  border-left-color: #e2b04a;
}

/* --- Experience --- */

body.dark-mode .experience-item {
  border-left-color: #e2b04a;
}

body.dark-mode .experience-item h4 {
  color: #ffffff;
}

body.dark-mode .experience-item .exp-company {
  color: #e2b04a;
}

body.dark-mode .experience-item .exp-dates {
  color: #9a9ab5;
}

body.dark-mode .experience-item p,
body.dark-mode .experience-item li {
  color: #9a9ab5;
}

/* --- Education --- */

body.dark-mode .education-block {
  background: #16213e;
  border-color: rgba(226, 176, 74, 0.2);
}

body.dark-mode .education-block h4 {
  color: #ffffff;
}

body.dark-mode .education-block .edu-meta {
  color: #9a9ab5;
}

body.dark-mode .education-block .coursework {
  color: #9a9ab5;
}

/* --- Skills --- */

body.dark-mode .skills-category h4 {
  color: #e2b04a;
  border-bottom-color: rgba(226, 176, 74, 0.2);
}

body.dark-mode .skill-tags span {
  background: rgba(226, 176, 74, 0.08);
  border-color: rgba(226, 176, 74, 0.15);
  color: #9a9ab5;
}

body.dark-mode .skill-tags span.cert {
  background: rgba(226, 176, 74, 0.12);
  color: #e2b04a;
  border-color: rgba(226, 176, 74, 0.25);
}

/* --- Contact Cards --- */

body.dark-mode .contact-card {
  background: #16213e;
  border-color: rgba(226, 176, 74, 0.2);
}

body.dark-mode .contact-card:hover {
  border-color: #e2b04a;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

body.dark-mode .contact-card-icon {
  color: #e2b04a;
}

body.dark-mode .contact-card-label {
  color: #9a9ab5;
}

body.dark-mode .contact-card-value {
  color: #ffffff;
}

/* --- Footer --- */

body.dark-mode #footer {
  color: #9a9ab5;
}

body.dark-mode #footer a {
  color: #e2b04a;
}
