/* ============================================================
  Blacline Official site — External Stylesheet
   Author: Michael Omoregie
   ============================================================ */


/* ============================================================
   CSS CUSTOM PROPERTIES (variables for consistency)
   ============================================================ */
:root {
  --color-bg:        #000000;
  --color-surface:   #000000;
  --color-border:    #2a2a2a;
  --color-text:      #fffefc;
  --color-muted:     #fffefc;
  --color-accent:    #8e8e79;
  --color-accent-light: #1a1608;

  --font-display:    'Cormorant Garamond', Georgia, serif;
  --font-body:       'DM Sans', 'Helvetica Neue', sans-serif;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;

  --radius:    2px;
  --transition: 0.2s ease;
}


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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);          /* INHERITANCE: inherited by all children */
  font-family: var(--font-body);     /* INHERITANCE: inherited by all children */
  font-size: 1rem;
  line-height: 1.7;                  /* INHERITANCE: inherited by all children */
  font-weight: 300;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;                    /* INHERITANCE: links inherit body color */
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.6;
}

ul {
  list-style: none;
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);  /* OVERWRITING: headings overwrite body's
                                        --font-body with the display serif font */
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); margin-bottom: var(--space-sm); }
h3 { font-size: 1.25rem; margin-bottom: var(--space-xs); }
h4 { font-size: 1rem; font-family: var(--font-body); font-weight: 500; }

em {
  font-style: italic;
  font-family: var(--font-display); /* OVERWRITING: em inside body text gets
                                       the serif display font for elegance */
}

p {
  margin-bottom: var(--space-sm);
  max-width: 65ch;
}


/* ============================================================
   OUTER CONTAINER — CSS GRID (page layout)
   (Assignment requirement: Grid for page structure)
   GRID used here: defines the full page layout with
   header, nav, main, aside, and footer areas.
   ============================================================ */
.container {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "header  header"
    "nav     nav"
    "main    aside"
    "footer  footer";
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}


/* ============================================================
   HEADER
   ============================================================ */
header {
  grid-area: header;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) var(--space-md);
}

.header-inner {
  display: flex;             /* FLEXBOX: aligns logo and tagline on same row */
  align-items: center;
  gap: var(--space-md);
}

.logo img {
  height: 100px;
  width: auto;
}

.logo span {
  color: var(--color-muted); /* OVERWRITING: span overwrites .logo's inherited
                                 color with a muted tone for the period */
}

.header-tagline {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0;          /* OVERWRITING: removes the default p margin-bottom
                                 inherited from the p rule above */
}


/* ============================================================
   NAV — FLEXBOX
   ============================================================*/

nav {
  grid-area: nav;
  border-bottom: 1px solid var(--color-border);
  padding: 0 var(--space-md);
  position: sticky;
  top: 0;
  background-color: var(--color-bg);
  z-index: 100;
}

.skip-nav {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-nav:focus {
  position: static;
  width: auto;
  height: auto;
}

.nav-list {
  display: flex;             /* FLEXBOX: horizontal navigation layout */
  align-items: center;
  gap: 0;
}

.nav-list li a {
  display: block;
  padding: var(--space-sm) var(--space-md) var(--space-sm) 0;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);  /* OVERWRITING: nav links overwrite body link color
                                  (which inherits --color-text) with muted tone */
  transition: color var(--transition);
}

.nav-list li a:hover,
.nav-list li a.active {
  color: var(--color-text);   /* OVERWRITING: active/hover state overwrites the
                                  muted color set above with the full text color */
  opacity: 1;
}


/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
main {
  grid-area: main;
  padding: var(--space-lg) var(--space-md);
  border-right: 1px solid var(--color-border);
}


/* ============================================================
   HERO (index.html)
   ============================================================ */
.hero {
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-lg);
}

.hero-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.hero-title {
  margin-bottom: var(--space-md);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}


/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-family: var(--font-body); /* OVERWRITING: section titles use body font,
                                     overwriting the h2 display font rule above */
  font-weight: 500;
  margin-bottom: var(--space-md);
}


/* ============================================================
   WORKS GRID
   ============================================================ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background-color: var(--color-border); /* border trick with gap */
}

.work-card {
  background-color: var(--color-surface);
  overflow: hidden;
}

.work-card--large {
  grid-column: span 2; /* OVERWRITING: large card overrides the default 1-column
                           span, stretching to fill both grid columns */
}

.work-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  object-fit: contain;
  object-position: center;
  display: block;
}

.work-card--large .work-img {
  aspect-ratio: 21/9; /* OVERWRITING: large card's image gets a wider cinematic
                          ratio, overwriting the standard 16/9 above */
}

.work-info {
  padding: var(--space-sm);
}

.work-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-xs);
}

.work-info h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.work-info p {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 0;
}


/* ============================================================
   GALLERY PAGE
   ============================================================ */
.page-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.page-header p {
  color: var(--color-muted);
  margin-bottom: 0;
}

/* Filter bar — FLEXBOX
   /* FLEXBOX: filter buttons laid out horizontally */
.filter-bar {
  display: flex;             /* FLEXBOX: filter buttons in a row */
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.filter-btn {
  background: none;
  border: 1px solid var(--color-border);
  padding: 0.4rem 1rem;
  font-family: var(--font-body); /* INHERITANCE: font inherited from body,
                                     explicitly set here to override browser default
                                     button font */
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  cursor: pointer;
  transition: all var(--transition);
  border-radius: var(--radius);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--color-text); /* OVERWRITING: active button overwrites
                                           transparent background with dark fill */
  color: var(--color-bg);              /* OVERWRITING: text color inverted */
  border-color: var(--color-text);
}

/* Gallery grid — CSS GRID
   (Assignment requirement: Grid for layout) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* GRID: 2-column responsive gallery */
  gap: 1px;
  background-color: var(--color-border);
}

.gallery-item {
  background-color: var(--color-surface);
  overflow: hidden;
}

.gallery-img {
  width: 100%;
  aspect-ratio: 20/9;
  overflow: hidden;
  object-fit: contain;
  object-position: center;
  display: block;
}

figcaption {
  padding: var(--space-sm);
}

figcaption h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

figcaption p {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0;
}


/* ============================================================
   ABOUT PAGE
   ============================================================ */

/* About grid — CSS GRID
   (Assignment requirement: Grid for layout)
   /* GRID: about page uses a 2-column grid for photo + bio */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr; /* GRID: photo column + wider bio column */
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.about-bio h2 {
  margin-bottom: var(--space-md);
}

.placeholder-img--portrait {
  aspect-ratio: 3/4 !important; /* OVERWRITING: portrait photos use 3:4 ratio,
                                    overwriting the default aspect-ratio set by
                                    the shared placeholder-img rules */
}

.contact-links {
  display: flex;             /* FLEXBOX: button row */
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

/* Resume section — FLEXBOX columns
   /* FLEXBOX: education and experience columns sit side by side */
.resume-section {
  margin-bottom: var(--space-xl);
}

.resume-columns {
  display: flex;             /* FLEXBOX: two resume columns side by side */
  gap: var(--space-xl);
}

.resume-col {
  flex: 1;                   /* FLEXBOX: each column grows equally */
}

.resume-col h3 {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.resume-item {
  margin-bottom: var(--space-md);
}

.resume-year {
  display: block;
  font-size: 0.75rem;
  color: var(--color-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.resume-item h4 {
  margin-bottom: 0.2rem;
}

.resume-item p {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 0;
}


/* ============================================================
   ASIDE / SIDEBAR
   ============================================================ */
aside {
  grid-area: aside;
  padding: var(--space-lg) var(--space-md);
}

.aside-inner h2 {
  font-size: 0.7rem;
  font-family: var(--font-body); /* OVERWRITING: sidebar h2 uses body font,
                                     not the inherited display serif */
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.aside-inner > * + * {
  margin-top: var(--space-md);
}

.skills-list li {
  font-size: 0.9rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.aside-inner p {
  font-size: 0.9rem;
  color: var(--color-muted);
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background-color: var(--color-text);
  color: var(--color-bg);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--color-text);
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
}

.btn:hover {
  background-color: transparent;
  color: var(--color-text);    /* OVERWRITING: on hover, button text color
                                   switches from light to dark */
  opacity: 1;
}

.btn--outline {
  background-color: transparent; /* OVERWRITING: outline variant overwrites the
                                     solid dark background of .btn */
  color: var(--color-text);
}

.btn--outline:hover {
  background-color: var(--color-text);
  color: var(--color-bg);
}


/* ============================================================
   PLACEHOLDER IMAGES (remove once you add your own photos)
   ============================================================ */
.placeholder-img {
  background-color: var(--color-accent-light);
  position: relative;
  overflow: hidden;
}

.placeholder-img::after {
  content: 'Add your image here';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Subtle tone variations for placeholder cards */
.placeholder-img--2 { background-color: #ede9e3; }
.placeholder-img--3 { background-color: #e8e8e3; }
.placeholder-img--4 { background-color: #e3e8e8; }
.placeholder-img--5 { background-color: #e8e3e8; }
.placeholder-img--6 { background-color: #e3e5e8; }


/* ============================================================
   FOOTER
   ============================================================ */
footer {
  grid-area: footer;
  border-top: 1px solid var(--color-border);
  padding: var(--space-md);
}

.footer-inner {
  display: flex;             /* FLEXBOX: footer items spread across row */
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0;
}

.footer-name span {
  color: var(--color-muted);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 0;
}

.footer-links {
  display: flex;             /* FLEXBOX: footer nav links in a row */
  gap: var(--space-md);
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--color-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: var(--color-text);
  opacity: 1;
}


/* ============================================================
   RESPONSIVE — narrow screens
   ============================================================ */
/* ============================================================
   RESPONSIVE LAYOUT
   ============================================================ */

/* Keep long content from stretching grid and flex columns */
.container > *,
.about-grid > *,
.resume-col,
.work-info {
  min-width: 0;
}

.skills-list a,
.resume-item a {
  overflow-wrap: anywhere;
}

.footer-links {
  flex-wrap: wrap;
}

.work-info p + p {
  margin-top: 1rem;
}

/* Contact page: let the introduction fill its available width */
.about-grid > .about-bio:only-child {
  grid-column: 1 / -1;
}

/* Keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
}

main {
  scroll-margin-top: 6rem;
}

/* Tablets and smaller screens */
@media (max-width: 900px) {
  .container {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto auto;
    grid-template-areas:
      "header"
      "nav"
      "main"
      "aside"
      "footer";
  }

  main {
    border-right: none;
    padding: 3rem 1.5rem;
  }

  aside {
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--color-border);
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
  }

  .about-photo {
    max-width: 420px;
  }

  .resume-columns {
    gap: 2rem;
  }
}

/* Phones */
@media (max-width: 600px) {
  .container {
    border-left: none;
    border-right: none;
  }

  header {
    padding: 1.25rem 1rem;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .logo img {
    height: auto;
    max-height: 72px;
    max-width: 100%;
    width: auto;
  }

  nav {
    padding: 0 0.5rem;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
  }

  .nav-list li {
    min-width: 0;
  }

  .nav-list li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 0.25rem;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-align: center;
  }

  .nav-list li a.active {
    box-shadow: inset 0 -2px 0 var(--color-text);
  }

  main {
    padding: 2rem 1rem;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }

  h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .hero {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
  }

  .hero-title {
    margin-bottom: 1.25rem;
    overflow-wrap: break-word;
  }

  .hero-sub {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-label {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }

  .page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .page-header h1 {
    margin-bottom: 0.75rem;
  }

  .works-grid,
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-card--large {
    grid-column: auto;
  }

  .work-info {
    padding: 1.25rem 1rem;
  }

  .work-info h3 {
    font-size: 1.4rem;
  }

  .work-info p {
    font-size: 0.95rem;
  }

  .work-tag {
    letter-spacing: 0.1em;
  }

  .about-grid {
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .about-bio h2 {
    margin-bottom: 1.25rem;
  }

  .resume-columns {
    flex-direction: column;
    gap: 1.5rem;
  }

  .resume-section {
    margin-bottom: 2rem;
  }

  .contact-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    max-width: 100%;
    min-height: 48px;
    padding: 0.85rem 1.25rem;
    text-align: center;
    white-space: normal;
  }

  .contact-links .btn {
    width: 100%;
  }

  /* Override the contact page's inline padding */
  main .contact-form {
    padding: 1rem 0.5rem;
    margin-top: 1.5rem;
  }

  .contact-form iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
  }

  aside {
    padding: 2rem 1rem;
  }

  .skills-list a {
    display: inline-block;
    padding: 0.4rem 0;
  }

  footer {
    padding: 1.5rem 1rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-links {
    justify-content: center;
    gap: 0.25rem 1rem;
  }

  .footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}