/* Richard Lee UX Portfolio - Local bare-bones version */

/* ---- SKIP LINK ---- */
.skip-link {
  position: fixed;
  top: 0;
  left: 1rem;
  z-index: 10000;
  transform: translateY(-100%);
  transition: transform 0.15s ease;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---- FOCUS STYLES ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  .skip-link { transition: none; }
  .project-card { transition: none; }
  .nav-toggle .bar { transition: none; }
  nav.site-nav ul { transition: none; }
  #lb-prev, #lb-next, #lb-close { transition: none; }
}

/* ---- PASSWORD GATE ---- */
#pw-gate {
  position: fixed;
  inset: 0;
  background: #0a0a12;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
#pw-gate .gate-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
}
#pw-gate h2 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
#pw-gate p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}
#pw-gate input {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  outline: none;
}
#pw-gate input:focus { border-color: var(--accent); }
#pw-gate button {
  width: 100%;
  padding: 0.65rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
}
#pw-gate button:hover { background: #80cfff; }
#pw-gate .error {
  color: #ff6b6b;
  font-size: 0.82rem;
  margin-top: 0.5rem;
  min-height: 1.2em;
}
:root {
  --bg: #111118;
  --surface: #1c1c28;
  --surface2: #24243a;
  --accent: #59b7ff;
  --text: #d8d8d8;
  --muted: #909090;
  --white: #fff;
  --border: #2a2a3e;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; opacity: 0.85; }
img { max-width: 100%; display: block; }

/* ---- NAV ---- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0a0a12;
  border-bottom: 1px solid var(--border);
}
nav.site-nav {
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}
nav.site-nav ul li a {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
}
nav.site-nav ul li a:hover,
nav.site-nav ul li a.active {
  color: var(--white);
  text-decoration: none;
}
nav.site-nav .logo, nav.site-nav .blurb {
  font-size: .9rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
}
nav.site nav span.blurb {
  font-size: .8rem;
  font-weight: normal;
}

/* ---- HAMBURGER BUTTON (hidden on desktop) ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 1.375rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
}
.nav-toggle .bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
/* Animate bars → X when menu is open */
header.nav-open .nav-toggle .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
header.nav-open .nav-toggle .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
header.nav-open .nav-toggle .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}


/* ---- HOME ---- */
.hero { text-align: center; padding: 3rem 0 2rem; }
.hero h1 { font-size: 2.8rem; color: var(--white); margin-bottom: 2rem; font-weight: 700; }
.hero img { max-width: 68%; border-radius: 6px; margin: 0 auto 2rem; }

.btn {
  display: inline-block;
  margin: 1.5rem 0 2.5rem;
  padding: 0.75rem 2.2rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  border-radius: 5px;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}
.btn:hover { background: #80cfff; text-decoration: none; opacity: 1; }

/* ---- WORK GALLERY ---- */
.page-title-bar { margin-bottom: 2.5rem; }
.page-title-bar h1 { font-size: 2rem; color: var(--white); font-weight: 700; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.project-card {
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: #444;
  text-decoration: none;
}
.project-card img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  background: var(--surface2);
}
.card-body { padding: 1.1rem 1.2rem 1.3rem; }

.card-title { font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: 0.3rem; }

.card-year { font-size: 0.78rem; color: var(--accent); margin-bottom: 0.4rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.card-industry { font-size: 0.82rem; color: #ccc; margin-bottom: 0.25rem; }

.card-skills { font-size: 0.8rem; color: #ddd; font-style: italic; }

/* ---- CASE STUDY PAGE ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.back-link:hover { color: var(--white); text-decoration: none; }

.page-header { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 1.9rem; color: var(--white); font-weight: 700; margin-bottom: 0.5rem; }
.page-header .meta { font-size: 0.9rem; color: var(--muted); }
.page-header .meta span { margin-right: 1.5rem; }

.section-label {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 0;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

/* Two-column feature block (image + text) */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
  align-items: start;
}
.feature-block img { border-radius: 5px; border: 1px solid var(--border); }
.feature-block h3 { font-size: 1rem; color: var(--white); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3rem; }
.feature-block .role { font-size: 0.85rem; color: var(--accent); margin-bottom: 1rem; }
.feature-block p { font-size: 0.97rem; margin-bottom: 0.75rem; }
.result { color: var(--white); font-weight: 500; }
.result span { text-transform: uppercase; font-size: 0.85rem; color: var(--accent); letter-spacing: 0.05em; }

/* Sub-page links */
.sub-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 3rem; }
.sub-link-btn {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 500;
}
.sub-link-btn:hover { background: var(--accent); color: #000; text-decoration: none; opacity: 1; }

/* Text sections */
.text-section { max-width: 820px; margin-bottom: 1rem; }
.text-section h2 { font-size: 1.3rem; color: var(--white); margin-bottom: 0.75rem; }
.text-section h3 { font-size: 1rem; color: var(--accent); margin: 1.5rem 0 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.text-section p { margin-bottom: 1rem; }

/* Image grids */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1rem 0;
}
.image-gallery img { border-radius: 5px; border: 1px solid var(--border); width: 100%; }
.full-img { width: 100%; border-radius: 5px; border: 1px solid var(--border); margin: 1.5rem 0; }
.half-img { max-width: 60%; border-radius: 5px; border: 1px solid var(--border); margin: 1.5rem auto; }

/* Video note */
.video-note {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  margin: 1.5rem 0;
}

/* Divider */
hr { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

/* ---- RESPONSIVE ---- */

/* Tablet */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .feature-block { grid-template-columns: 1fr 1.5fr; gap: 1.5rem; }
}

/* Mobile — hamburger nav */
@media (max-width: 720px) {

  /* Show the hamburger button */
  .nav-toggle { display: flex; }

  /* Nav row: logo left, hamburger right */
  nav.site-nav {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
  }

  /* Hide link list — slides in below the nav row when open */
  nav.site-nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.28s ease-out, opacity 0.18s ease;
  }
  header.nav-open nav.site-nav ul {
    max-height: 30rem;
    opacity: 1;
  }

  /* Divider lines between links */
  nav.site-nav ul li {
    border-top: 1px solid var(--border);
  }

  /* Generous touch targets */
  nav.site-nav ul li a {
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    padding: 0.85rem 0.25rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    width: 100%;
  }

  /* Page layout */
  main { padding: 2rem 1rem 4rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero img { max-width: 100%; }
  .feature-block { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .half-img { max-width: 100%; }
  .sub-links { gap: 0.5rem; }
  .sub-link-btn { padding: 0.6rem 1rem; min-height: 44px; display: inline-flex; align-items: center; }
  .page-header h1 { font-size: 1.5rem; }

  /* Lightbox nav buttons closer on small screens */
  #lb-prev { left: 0.4rem; }
  #lb-next { right: 0.4rem; }
}

/* Small phones */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .gallery-grid { gap: 1.25rem; }
  .card-body { padding: 0.9rem 1rem 1.1rem; }
  .btn { display: block; text-align: center; }
}


/* 2026 additions */

/* ---- LAYOUT ---- */
.container {
  width: min(100% - 2rem, 1200px);
  margin-inline: auto;
  padding-inline: 1rem;
}

.container.narrow {
  max-width: 950px;
}

main { 
	max-width: 900px; 
	margin: 0 auto; 
	padding: 2rem 1rem; 
}

/* adjust hero artifacts to fit browser */
div.hero img, div.bodycopy img {
  width: 33vmin;
  height: auto;
}

div.hero h1, div.page-title-bar h1 {
  font-size: clamp(.9rem, 6vw, 2rem);
  line-height: 1.1;
  margin-bottom: .5rem
}
div.hero h1 span, div.page-title-bar h2 {
  font-size: clamp(.7rem, 4vw, 1.5rem);
  line-height: .9;
}

/* main content settings */
.bodycopy {
  max-width: 90%;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.85;
  text-align: left;
  color: var(--text);
}
.bodycopy p + p { margin-top: 1rem; }

.bodycopy ul li {
	list-style: none;
}

.bodycopy h3 {
	margin-top: .75rem;
}

hr {
	margin: 1rem 0;
}

/* c code */
img {
	max-width: 100%;
	height: auto;
}

/* ---- LIGHTBOX ---- */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}
#lightbox.open {
  display: flex;
}
#lightbox figure {
  position: relative;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}
#lb-img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  cursor: default;
}
#lb-caption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
  max-width: 60ch;
}

/* Nav buttons */
#lb-prev,
#lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-size: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#lb-prev { left: 1rem; }
#lb-next { right: 1rem; }
#lb-prev:hover,
#lb-next:hover { background: rgba(255, 255, 255, 0.2); }

/* Close button */
#lb-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-size: 1.4rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
#lb-close:hover { background: rgba(255, 255, 255, 0.2); }

/* Focus rings on lightbox controls */
#lb-close:focus-visible,
#lb-prev:focus-visible,
#lb-next:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  #lb-prev, #lb-next, #lb-close { transition: none; }
}

@media (max-width: 720px) {
  #lb-prev { left: 0.4rem; }
  #lb-next { right: 0.4rem; }
  #lb-prev, #lb-next { width: 2.4rem; height: 2.4rem; font-size: 1.2rem; }
  #lightbox figure { max-width: 96vw; }
}