/* ====== Design Tokens ====== */
:root {
  --bg: #111616;           
  --text: #E8ECE9;         
  --text-muted: #C8CDC9;   
  --link: #E8ECE9;
  --link-muted: #BFC5C1;

  /* Type scale */
  --hero-size: clamp(1.65rem, 3vw + 0.825rem, 3.3rem);   
  --body-size: clamp(0.945rem, 0.331vw + 0.892rem, 1.05rem); 
  --leading: 1.6;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --radius: 8px;

  --section-gap: var(--space-8); /* spacing between projects  */
}


*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Karla", sans-serif; 
  font-size: var(--body-size);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(2rem, 6vw, 4rem);
  opacity: 0; /* fade effect */
  transition: opacity 250ms ease;
}
.page.is-visible { opacity: 1; }

.content {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.5rem, 5vw, 3rem);
  padding-right: clamp(1.5rem, 5vw, 3rem);
}


.hero {
  max-width: 100%;
  margin: 0;
  padding-top: clamp(1rem, 3vw, 2rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.hero h1 {
  margin: 0;
  font-family: "Lora", Georgia, "Times New Roman", Times, serif; /* keep Lora for hero */
  font-weight: 400;
  font-size: var(--hero-size);
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--text);
}

.nowrap { white-space: nowrap; }


.about {
  max-width: 860px;
  margin: 0;
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: flex-start;
  padding-bottom: clamp(2rem, 6vw, 4rem);
}

.portrait {
  flex: 0 0 auto;
  margin: 0;
  width: clamp(220px, 26vw, 320px);
  border-radius: var(--radius);
  overflow: hidden;
}
.portrait img {
  display: block;
  width: 100%;
  height: auto;
}

.bio {
  flex: 1 1 640px;
  max-width: 62ch;
  color: var(--text-muted);
  font-family: "Lora", Georgia, "Times New Roman", Times, serif; /* force Lora for main bio*/
}

.bio p { margin: 0 0 var(--space-3); }
.bio a {
  color: var(--link);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity .2s ease;
}
.bio a:hover { opacity: 0.85; }




/* ====== Calls-to-action ====== */
.cta {
  display: flex;
  margin-top: var(--space-4);
  padding-top: var(--space-6);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.cta-link {
  font-family: 'Karla', sans-serif;  /* force Karla for ctas */
  font-weight: 600;                  
  color: var(--link);
  text-decoration: none; 
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  line-height: 1.2;
  padding-bottom: 2px;
  transition: opacity .2s ease;
}


.cta-link:hover { opacity: .85; }
.cta-link:last-child {
  margin-left: auto;
  margin-right: 3rem;
}

/* responsiveness */
@media (max-width: 1000px) {
  .hero { padding-top: clamp(1.5rem, 5vw, 3rem); }
  .about { gap: var(--space-3); }
}
@media (max-width: 760px) {
  .about { flex-direction: column; align-items: center; }
  .bio { max-width: 66ch; }
  .cta { gap: var(--space-3); }
}
@media (max-width: 420px) {
  .hero h1 { letter-spacing: 0; }
}

/* for writing page */
.back-link {
  color: var(--link);
  text-decoration: none;
  font-size: 1.25rem;
}
.writing {
  max-width: 860px;
  margin: 0;
}
.writing-subtitle {
  margin: var(--space-4) 0 var(--space-2);
  font-weight: 500;
  color: var(--text);
  font-size: var(--body-size);
  line-height: var(--leading);
}


.work-list a {
  color: var(--link);
  text-decoration: none;      
  font-weight: 500;           
  transition: opacity .2s ease;
}

.work-list a:hover {
  opacity: 0.85;
}



.work-list { margin: 0; padding: 0; list-style: none; }
.work-list li { margin: 0 0 var(--space-2); color: var(--text-muted); }
.work-list a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity .2s ease;
}
.work-list a:hover { opacity: .85; }
.poetry-list { padding-bottom: var(--space-4); }

/* force section headers to Lora on Writing page*/
.writing-subtitle {
  font-family: "Lora", Georgia, "Times New Roman", Times, serif;
}


/* back arrow */
.airy-arrow {
  position: fixed;
  top: clamp(2rem, 6vw, 4rem);
  left: calc(clamp(1.5rem, 5vw, 3rem) + env(safe-area-inset-left, 0px));
  z-index: 1000;
  display: inline-block;
  width: 3rem;
  height: 1.2rem;
  color: var(--link);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity .2s ease;
}
.airy-arrow:hover { opacity: 1; }
.airy-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: translateY(-50%);
}
.airy-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.75rem;
  height: 0.75rem;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: translateY(-50%) rotate(-45deg);
}

/* for portfolio */
.portfolio-lean {
  max-width: 860px;
  margin: 0 auto;
  font-family: 'Karla', sans-serif;
}

.case {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  column-gap: var(--space-4);
  align-items: start;
  padding: var(--section-gap) 0;
  position: relative;
}
.case + .case::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  transform: translateY(calc(-0.5 * var(--section-gap)));
  height: 1px;
  background: rgba(255,255,255,0.12);
}

/* project names in Lora */
.case-title {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  font-size: clamp(1.25rem, 1.2vw + 1rem, 1.75rem);
  line-height: 1.15;
  font-family: "Lora", Georgia, "Times New Roman", Times, serif;
}

/* Meta info below title */
.case-meta {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95em;
}

/* section headers for projects*/
.case-body strong {
  display: block;
  margin-top: var(--space-2);
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--text);
  font-family: 'Karla', sans-serif;
}

/* body text & lists  in light karla for portfolio */
.case-body p,
.case-body ul,
.case-body li {
  font-family: 'Karla', sans-serif;
  font-weight: 300; /* Light */
  color: var(--text-muted);
}

#tyson .tyson-images img {
  max-width: 530px;
  height: auto;
  display: block;
  margin: 1rem 0;
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 720px) {
  #tyson .tyson-images img {
    max-width: 250px; /* force small tyson pics on mobile */
    height: auto;
  }
}


.case-meta {
  display: inline-flex;
  align-items: center;
}

.case-meta .dot {
  padding: 0 0.4em; /* space left & right of the dot */
  line-height: 1;   /* keeps the dot centered vertically */
}


.photo-credit {
  font-size: small;
  font-style: italic;
  margin-top: 7px;
  padding: 20px 0 70px 0;
}

/* hide forced break on desktop */
.mobile-break {
  display: none;
}

/* show forced break on mobile */
@media (max-width: 600px) {
  .mobile-break {
    display: block;   /* forces line break */
  }
}


/* Responsive */
@media (max-width: 720px) {
  .case { grid-template-columns: 1fr; row-gap: var(--space-2); }
  .case-head { grid-column: 1; }
  .case-body { grid-column: 1; }
}
