/* ══════════════════════════════════════════════
   traceytrahan.com — Portfolio Styles
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=DM+Mono:wght@400;500&display=swap');

/* ── TOKENS ──────────────────────────────────── */
:root {
  --bg:           #F6F8FB;
  --surface:      #FFFFFF;
  --navy:         #1B2D4F;
  --blue:         #3079E3;
  --blue-soft:    #EDF3FE;
  --red:          #E63946;
  --text:         #0F1B2D;
  --muted:        #667A90;
  --border:       #DDE4EE;
  --shadow-sm:    rgba(27, 45, 79, 0.07);
  --shadow-md:    rgba(27, 45, 79, 0.14);
  --shadow-hover: rgba(48, 121, 227, 0.18);

  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;

  --radius:    12px;
  --radius-sm: 6px;
  --max-w:     1120px;
  --ease:      0.38s ease;
}

/* ── RESET & BASE ────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* ── NAV ─────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--navy); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--ease);
}

/* ── HERO ────────────────────────────────────── */
#about {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 2rem 72px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 5rem;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-headline {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

.hero-headline em {
  font-style: normal;
  color: var(--blue);
}

.hero-bio {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 500px;
  margin-bottom: 2rem;
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary           { background: var(--blue); color: #fff; }
.btn-primary:hover     { background: #1f68d6; transform: translateY(-1px); }
.btn-outline           { background: transparent; color: var(--navy); border: 1.5px solid var(--border); }
.btn-outline:hover     { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }

/* Stats row */
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-item { display: flex; flex-direction: column; }

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

/* Headshot */
.headshot-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 28px var(--shadow-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--muted);
}

.headshot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.headshot-placeholder { text-align: center; pointer-events: none; }
.headshot-placeholder svg { width: 64px; height: 64px; margin: 0 auto 0.5rem; opacity: 0.25; }
.headshot-placeholder p  { font-size: 0.78rem; opacity: 0.45; }

/* ── SIGNATURE: BAR-CHART SECTION DIVIDER ─────
   This mini bar chart acts as a visual bridge
   between the hero and projects sections.        */
.section-break {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.chart-divider {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 44px;
  padding-top: 10px;
}

.chart-divider span {
  flex: 1;
  background: var(--blue);
  border-radius: 3px 3px 0 0;
  opacity: 0.13;
  transition: opacity 0.3s;
}

.section-break:hover .chart-divider span {
  opacity: 0.22;
}

/* ── PROJECTS ────────────────────────────────── */
#projects { padding: 64px 2rem 96px; }

.section-inner { max-width: var(--max-w); margin: 0 auto; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.03em;
  margin-bottom: 2.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* ── PROJECT CARDS ───────────────────────────── */
.project-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  /* Grayscale at rest — color & scale on hover */
  filter: grayscale(100%) brightness(0.9);
  transition:
    filter    var(--ease),
    transform var(--ease),
    box-shadow var(--ease);
  box-shadow: 0 2px 10px var(--shadow-sm);
  will-change: filter, transform;
}

.project-card:hover {
  filter: grayscale(0%) brightness(1.04);
  transform: scale(1.025) translateY(-5px);
  box-shadow: 0 22px 56px var(--shadow-hover);
}

.card-preview {
  width: 100%;
  height: 210px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.card-preview svg { width: 100%; height: 100%; max-height: 176px; }

.card-body { padding: 1.25rem 1.5rem 1.5rem; }

.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 500;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-tools { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.tool-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.15rem 0.42rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.card-arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.project-card:hover .card-arrow { opacity: 1; }

/* ── FOOTER ──────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 2rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy { font-size: 0.78rem; color: var(--muted); }

.footer-links { display: flex; gap: 1.5rem; }

.footer-links a {
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--blue); }

/* ── PROJECT DETAIL PAGE ─────────────────────── */
.back-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 2rem;
}

.back-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

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

.project-detail-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.project-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 1rem;
}

.project-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 2.75rem;
}

/* Power BI Embed */
.embed-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 2px 16px var(--shadow-sm);
}

.embed-label {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.embed-label-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.embed-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.embed-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.embed-placeholder {
  text-align: center;
  color: var(--muted);
}

.embed-placeholder svg  { margin: 0 auto 0.75rem; }
.embed-placeholder p    { font-size: 0.83rem; margin-top: 0.25rem; }
.embed-placeholder code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--border);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

/* Project write-up */
.project-content {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
}

.content-section + .content-section { margin-top: 2rem; }

.content-section h2 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.875rem;
}

.content-section p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.tools-list { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 900px) {
  #about {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 56px 1.5rem 56px;
  }

  .hero-photo { order: -1; max-width: 220px; margin: 0 auto; }
  .projects-grid    { grid-template-columns: 1fr; }
  .project-content  { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 600px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.25rem 2rem;
    gap: 1.25rem;
    box-shadow: 0 8px 24px var(--shadow-sm);
  }

  .nav-links.open { display: flex; }

  .hero-stats { gap: 1.25rem; flex-wrap: wrap; }
  #projects   { padding: 48px 1.5rem 72px; }
  .project-detail-main { padding: 2rem 1.5rem 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
