/*
  This file controls how the whole site looks: colors, fonts, spacing.
  It's plain CSS — every page links to this one file, so changing a value
  here changes it everywhere.

  ---------------------------------------------------------------------
  1. TOKENS — the site's palette and type, defined once as variables
  ---------------------------------------------------------------------
*/
:root {
  --bg: #101216;             /* page background */
  --surface: #1b1e25;        /* cards / raised panels */
  --ink: #eef0f3;            /* main text color */
  --muted: #9299a6;          /* secondary text color */
  --border: #2b2f38;         /* thin dividing lines */
  --accent: #35d0c0;         /* the one accent color, used sparingly */
  --accent-ink: #0b0d10;     /* text color on top of --accent */

  --font-display: 'Roboto', system-ui, sans-serif;  /* headings/titles */
  --font-body: 'Inter', system-ui, sans-serif;      /* body text */

  --max-width: 960px;
}

/*
  ---------------------------------------------------------------------
  2. RESET — browsers add their own default spacing/fonts; this removes
  most of it so we start from a clean, predictable baseline.
  ---------------------------------------------------------------------
*/
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em 0;
}
p {
  margin: 0 0 1em 0;
}
a {
  color: var(--accent);
}
img {
  max-width: 100%;
  display: block;
}

/*
  ---------------------------------------------------------------------
  3. LAYOUT — header, main content area, footer
  ---------------------------------------------------------------------
*/
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}
.logo-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
}
.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}
.logo-subtitle {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.site-nav {
  display: flex;
  gap: 1.5rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover {
  color: var(--accent);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/*
  ---------------------------------------------------------------------
  4. HOME PAGE — hero intro + the list of 4 projects
  ---------------------------------------------------------------------
*/
.hero {
  padding: 3rem 0 2.5rem;
}
/* Two columns: text on the left, an image on the right. Below 700px wide
   (phones), it drops to a single column and stacks — text first, image
   below — because that's the order the HTML is written in. */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 700px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 0.3rem;
}
.hero-subtitle {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 1rem;
}
.hero-summary {
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Reusable stand-in box wherever a real image isn't in place yet. Swap
   the <div class="image-placeholder"> for an <img src="/images/..." />
   once you have real photos/renders — see README for the images folder. */
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1rem;
}
.hero-grid .image-placeholder {
  aspect-ratio: 4 / 3;
}
.hero-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.projects h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.project-row {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.project-number {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.95rem;
  flex-shrink: 0;
}
.project-link {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  text-decoration: none;
  color: var(--ink);
}
.project-link-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}
.project-thumb {
  width: 96px;
  height: 72px;
  flex-shrink: 0;
  font-size: 0.7rem;
  border-radius: 8px;
  object-fit: cover;
}
.project-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.project-link:hover .project-title {
  color: var(--accent);
}
.project-blurb {
  color: var(--muted);
  font-size: 0.95rem;
}

/*
  ---------------------------------------------------------------------
  5. PROJECT DETAIL PAGES
  ---------------------------------------------------------------------
*/
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back-link:hover {
  color: var(--accent);
}
.project-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}
.project-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}
/* Text sections on the left, an image gallery on the right. Stacks to a
   single column (text first, then images) below 700px wide. */
.project-body {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 700px) {
  .project-body {
    grid-template-columns: 1fr;
  }
}
.project-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 1.5rem;
}

/* Click-through image gallery (src/components/Gallery.astro): one big
   image on top, small clickable thumbnails below it. */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.gallery-main {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0;
  cursor: zoom-in;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Full-screen image viewer, created by Gallery.astro's script the first
   time someone clicks a main image. Hidden until ".open" is added. */
.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 1000;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
}
.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox-prev {
  left: 1.5rem;
}
.lightbox-next {
  right: 1.5rem;
}
.lightbox.single-image .lightbox-arrow {
  display: none;
}
.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}
.gallery-thumb {
  width: 64px;
  height: 48px;
  flex-shrink: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: none;
  cursor: pointer;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb:hover {
  border-color: var(--muted);
}
.gallery-thumb.active {
  border-color: var(--accent);
}

/* YouTube embed slot */
.project-video {
  border-radius: 10px;
  overflow: hidden;
}
.project-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}
.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1rem;
  aspect-ratio: 16 / 9;
}
.project-page section {
  margin-bottom: 2rem;
}
.project-page h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}
.tag-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.project-cta {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  font-size: 0.95rem;
}
.project-cta:hover {
  opacity: 0.9;
}

/*
  ---------------------------------------------------------------------
  6. OTHER WORK PAGE — a lighter-weight grid for projects that don't get
  a full case-study page: just a title, image, and short summary.
  ---------------------------------------------------------------------
*/
.other-projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
@media (max-width: 700px) {
  .other-projects-grid {
    grid-template-columns: 1fr;
  }
}
.other-project-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}
.other-project-card .image-placeholder {
  aspect-ratio: 4 / 3;
}
.other-project-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0;
}
.other-project-card:hover h2 {
  color: var(--accent);
}
.other-project-summary {
  color: var(--muted);
  font-size: 0.95rem;
}

/*
  ---------------------------------------------------------------------
  7. RESUME PAGE
  ---------------------------------------------------------------------
*/
.resume-page h1 {
  margin-bottom: 0.5rem;
}
.resume-embed {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.resume-embed iframe {
  display: block;
  border: none;
}

/*
  ---------------------------------------------------------------------
  8. CONTACT PAGE
  ---------------------------------------------------------------------
*/
.contact-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  border-top: 1px solid var(--border);
}
.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-label {
  width: 100px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.contact-list a {
  text-decoration: none;
}
.contact-list a:hover {
  text-decoration: underline;
}

/*
  ---------------------------------------------------------------------
  9. SMALL SCREENS
  ---------------------------------------------------------------------
*/
@media (max-width: 480px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .project-row {
    flex-direction: column;
    gap: 0.3rem;
  }
  .resume-embed iframe {
    height: 500px;
  }
}
