@import url('variables.css');

h1, h2, h3, h4, p, ul, figure {
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.content-wrapper {
  max-width: 1020px;
  margin: auto;
}

.note-wrapper {
  max-width: 760px;
  margin: auto;
  margin-top: var(--space-lg);
  padding: 0 var(--space-sm) var(--space-sm) var(--space-sm);
}

.now-wrapper {
  max-width: 640px;
  margin-top: var(--space-lg);
}

@media (max-width: 1020px) {
  .content-wrapper {
  padding: 0 var(--space-sm) var(--space-sm) var(--space-sm);
  }

  .note-wrapper {
  padding: 0 var(--space-sm) var(--space-sm) var(--space-sm);
  }
}

/* Dividers */

.small-divider {
  height: var(--space-sm);  
}  

.medium-divider {
  height: var(--space-md);
}

.large-divider {
  height: var(--space-lg);
}

hr.solid {
  border: 1px solid var(--color-border-subtle);
}

/* Navigation */

.navbar {
width: 100%;
background: #fff;
padding: 0rem 1rem 0rem 1rem;
top: 0;
z-index: 3;
position: sticky;
border-bottom: 1px solid var(--color-border-subtle);
}

.nav-container {
max-width: 1020px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
font-family: sans-serif;
}

.nav-logo a {
font-weight: 400;
font-size: var(--font-size-large-p);
color: inherit;
}

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

.nav-links li a {
text-decoration: none;
padding: 0.5rem;
font-weight: 400;
font-size: var(--font-size-p);
color: inherit;
border-radius: 12px;
}

.nav-links li a:hover {
background: var(--color-background-subtle);
}

.nav-icon {
display: none;
font-size: 1.5rem;
cursor: pointer;
}

.nav-toggle {
display: none;
}

.nav-toggle:checked {
display: none;
}

@media (max-width: 600px) {

.navbar {
  padding: 0.5rem 1rem 0.5rem 1rem;
    }

/* Show burger icon on mobile */
.nav-icon {
  display: block;
}

/* When checkbox is checked, show the menu */
.nav-toggle:checked + .nav-icon + .nav-links {
  display: flex;
}

.nav-links {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
  margin-top: 0.2rem;
  margin-bottom: 2rem;
  padding-inline-start: 0px;
}

.nav-links li {
  text-align: center;
  padding-inline-start: 0px;
}
}


/* On desktop, show links in row and hide burger */
@media (min-width: 601px) {
.nav-links {
  display: flex !important;
  flex-direction: row;
  text-align: center;
  padding-inline-start: 0px;
}

.nav-icon {
  display: none;
}
}

/* Section Styles */

section {
  margin-top: 4rem;
  margin-bottom: 6rem;
}

.note-section {
  margin-bottom: 6rem;  
}

/* Text styles */

body {
  font-family: 'Instrument Sans', Helvetica, sans-serif;
  font-weight: 400;
  line-height: clamp(1.66, 2vw, 1.75);
  margin: auto;
  color: var(--color-text);
}

hgroup {
  margin: var(--space-lg) 0 var(--space-lg) 0;
}

h1 {
  font-family: "Source Serif 4", serif;  
  font-weight: 500;
  font-size: var(--font-size-h1);  
  line-height: 1.4;
  padding-bottom: 5px;
  margin-top: 0;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

h2 {
font-family: 'Instrument Sans', Helvetica, sans-serif;
font-weight: 400;
font-size: var(--font-size-h2);
margin-top: 0;
margin-bottom: 1.2rem;
text-decoration-thickness: 50%;
letter-spacing: -0.02em;
}

.note-wrapper h2 {
  font-family: 'Instrument Sans', Helvetica, sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  font-size: var(--font-size-h4);
  color: var(--color-text-subheading);
  margin-top: 0;
  margin-bottom: 0.5rem;
  }

h3 {
  font-weight: 380;
  font-size: var(--font-size-h3);
  margin-top: 0;
  margin-bottom: 0.3rem;
}

h4 {
  font-weight: 500;
  font-size: var(--font-size-h4);
  margin-top: 0;
  margin-bottom: 0.3rem;
}

h2, h3, h4 {
  scroll-margin-top: 5rem; /* adjust to your header height */
}

.home {
font-family: "Source Serif 4", serif;
font-weight: 350;
}

p {
font-family: "Source Serif 4", serif;
font-optical-sizing: auto;
font-size: var(--font-size-p);
margin-block-start: 0.5em;
letter-spacing: 0.01em;
line-height: 1.6;
}

.large-p {
  font-size: var(--font-size-large-p);
  line-height: 1.6;
}

small {
  color: var(--color-text-subtle);
  font-size: var(--font-size-small);
  font-weight: 400;
  font-family: 'Instrument Sans', Helvetica, sans-serif;
  letter-spacing: 0.03em;
}

.subheader {  
  font-family: 'Instrument Sans', Helvetica, sans-serif;
  font-weight: 400;
  font-size: var(--font-size-h3);
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--color-text-subheading);
  line-height: 1.66;
  letter-spacing: -0.01em;
  }

.subheader-small {  
  font-weight: 400;
  font-size: var(--font-size-h4);
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--color-text-subheading);
  }  

ul {
  font-family: "Source Serif 4", serif;
  font-size: var(--font-size-p);
  font-weight: 380;
  margin-bottom: 2em;
  line-height: 1.6;
}

.nobullet-ul {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.6;
}

li {
  font-family: "Source Serif 4", serif;
  font-size: var(--font-size-p);
  font-weight: 380;
}

/* Images */

img {
  max-width: 100%;
  height: auto;
  display: block;
  /* margin-top: 0.5rem;
  margin-bottom: 1rem; */
}

figcaption {
  color: var(--color-text-subtle);
  margin: auto;
  text-align: center;
  font-size: var(--font-size-small);
  font-style: italic;
  margin-top: 0.5rem;
}

figcaption a {
  font-weight: 500;
  max-width: 100%;
  color: inherit;
}

.post-image {
  border: 1px solid var(--color-border-subtle);
  border-radius: 1rem;
  box-shadow: 0 2px 8px var(--color-shadow);
}

.no-bg-image {
  max-width: 100%;
}

.small-grid-image {
  height: 200px;
  width: auto;
}

.inline-icon {
  display: inline;
  margin: 0 0.125em;
  padding: 0;
  vertical-align: text-bottom;
  height: 24px;
}

/* Links */

a {
  transition: text-decoration 0.2s;
  font-weight: 400;
  text-decoration: underline;
  color: var(--color-text);
  text-decoration-color: var(--color-text-subtle);
  border-radius: 4px;
}

a:hover {
  color: var(--color-link);
}  

figure {
  display: flex;
  flex-direction: column;
  padding-bottom: var(--space-lg);
  margin-inline-start: 0;
  margin-inline-end: 0;
}

mark {
  background-color:var(--color-background-accent);
}

/* Footnote number */
.footnote-ref {
  color: var(--color-text-accent); /* or any specific color like #447979 */
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  vertical-align: super;
  position: relative;
}

/* Footnotes list area */
.footnotes {
  font-size: var(--font-size-p);
  color: var(--color-text-subheading);
  margin-top: 3rem;
}

.footnotes ol {
  padding-left: 1.5rem;
}

.footnotes li {
  margin-bottom: 0.5rem;
}

.backlink {
  font-size: var(--font-size-p);
  text-decoration: none;
  margin-left: 0.3rem;
  color: var(--color-text);
}

h1 .footnote-ref,
h2 .footnote-ref,
h3 .footnote-ref,
h4 .footnote-ref {
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 0.5;
  vertical-align: baseline;
  position: relative;
  top: -0.5em;
  text-decoration: none;
  color: var(--color-text-accent);
}

/* Ensure heading and footnote jump targets don't get hidden under sticky headers */
[id^="ref-"], [id^="footnote-"] {
  scroll-margin-top: 7rem; /* Adjust based on your sticky header height */
}


/* If you want to make parts of text stand out or add a note */

.big {
  font-size: var(--font-size-large-p);   
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.italic {
font-style: italic;
font-weight: 370;
}

.centered {
  text-align: center;
}

.framed {
  background-color: var(--color-background-framed);
  border-color: var(--color-border-subtle);
  border-style: solid;
  border-width: 0.5px;
  border-radius: 0.5rem;
  color: #1c1c1c;
  padding: 1.5rem 1.2rem 1.2rem 1.2rem;
  margin-bottom: 2rem;
  box-shadow:0px 2px 8px 0 rgba(119, 119, 119, 0.2);
}

.post-note{
background-color: var(--color-background);
border-radius: 0.75rempx;
border: 1px solid var(--color-border-subtle);
color: var(--color-text);
margin: 2rem auto;
width: 75%;
text-align: center;
padding: 1.5rem;
box-shadow: 0 2px 8px var(--color-shadow);
}

.disclaimer{
  background-color: var(--color-background);
  border-radius: 0.5rem;
  border: 1px solid var(--color-border-subtle);
  color: #1c1c1c;
  margin: 2.6rem auto;
  width: 75%;
  text-align: center;
  padding: 1.5rem;
  box-shadow: 0 2px 8px var(--color-shadow);
  }

.disclaimer h2 {
  color: var(--color-text-negative);
}

blockquote {
  font-family: "Source Serif 4", serif;
  font-size: var(--font-size-blockquote);
  padding-left: var(--space-sm);
  border-left: 3px solid var(--color-border-subtle);
  color: var(--color-text-subheading);
  margin-bottom: 4rem;
}

@media (max-width: 820px) {
.post-note {
  width: 100%;
}
}

@media (max-width: 820px) {
  .disclaimer {
    width: 100%;
  }
  }

/* Alert */

.info-text-alert {
  font-style: italic;
  text-indent: 0px;
  border-radius: 16px;
  padding: 0.6rem 1rem 0.6rem 1rem;
  margin-top: 1rem;
  margin-bottom: 40px;
  color: rgb(193, 83, 19);
  background-color: var(--color-background);
  width:fit-content;
}

/* Footer */
footer {  
display: flex;
justify-content: space-between;
background: var(--color-background);
border-top: 1px solid var(--color-border-thin);
margin-top: var(--space-md);
padding: 1rem;
top: 0;
color: #333;
position: sticky;
}

@media (max-width: 768px) {
  footer {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }

  footer > * {
    margin-bottom: 1rem; /* Adds space between footer items */
  }
  
  footer > *:last-child {
    margin-bottom: 0; /* Removes margin from the last item */
  }

}

.contact-links {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-block-start: 0.5rem;
  }

.contact-links a {
  text-decoration: none;
}

.icon-link {  
  transition: all 0.3s ease; /* Add transition for hover effects */
  padding: 0rem 0.5rem 0rem 0.5rem;
}


/* Tags layout */

.word-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tag {
  background-color: var(--color-background-subtle);
  color: var(--color-text);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  white-space: nowrap;
  /* transition: background-color 0.2s; */
  font-size: var(--font-size-small);
}

/* .tag:hover {
  background-color: #d0dcdc;
} */

/* Notes Grid */

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

/* Adjust grid for smaller screens */
@media (max-width: 1024px) {
  .notes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .notes-grid {
    grid-template-columns: 1fr;
  }
}

/* Note Entry */

.note-card div {
display: flex;
justify-content: space-between;
align-items: center;
}

.note-card h3 {
margin-bottom: 0.5rem;
}

.note-card h3:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-text-subtle);
}

.note-card small {
font-size: var(--font-size-small);
color: var(--color-text-subtle);
}

.note-card a {
text-decoration: none;
}

/* .note-card a:hover {
text-decoration: underline;
} */

/* Essays Grid */

.essays-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
margin-top: 2rem;
margin-bottom: 3rem;
}

/* Adjust grid for smaller screens */
@media (max-width: 1024px) {
.essays-grid {
  grid-template-columns: repeat(2, 1fr);
}
}

@media (max-width: 600px) {
.essays-grid {
  grid-template-columns: 1fr;
}
}

/* Note subheader */
.entry-data {  
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border-thin);
  padding-top: 1rem;
  padding-bottom: 1rem;
  top: 0;
  color: #333;
  }  

/* Essay Card */
.essay-card {
  background: rgb(249, 249, 249);
  border: 1px solid #efefef;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: box-shadow 0.3s ease;
  display: flexbox;
  justify-content: space-between;
  align-items: top;
}

.essay-card:hover {
  box-shadow: 0 8px 20px var(--color-shadow);
}

.essay-card h2 {
  margin-top: 0;
  color: var(--color-text);
}

.essay-card a {
  font-weight: 400;
  text-decoration: none;
}


/* Case Grid */

.case-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
margin-top: 2rem;
margin-bottom: 3rem;
}

/* Adjust grid for smaller screens */
@media (max-width: 1024px) {
.case-grid {
  grid-template-columns: repeat(2, 1fr);
}
}

@media (max-width: 600px) {
.case-grid {
  grid-template-columns: 1fr;
}
}

/* Case Cards */
.case-card {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: top;
  color: var(--color-text);
}

.case-card h3 {
  color: var(--color-text);
}

.case-card h3:hover {
  color: var(--color-text);
  text-decoration: underline;  
}


.case-card-link {
  text-decoration: none;
  display: block;
}


.case-card-link:hover,
.case-card-link:focus,
.case-card-link:visited,
.case-card-link:active {
  color: inherit;
  text-decoration: none;
  background: none;
}

.case-card:hover img {
  transform:scale(1.03);
}

/* Horizontal Case Grid */
.case-grid-horizontal {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

/* Horizontal Case Card */
.case-card-horizontal {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  color: var(--color-text);
}

.case-card-image {
  display: block; /* prevents spacing bugs */
  border-radius: 0.5rem;  /* Optional: adds a soft edge/frame feel */
  flex: 1;
  min-width: 40%;
  overflow: hidden;       /* Hides the zoom overflow */
}

.case-card-image img {
  transition: transform 0.2s ease-in;
}

.case-card-horizontal:hover .case-card-image img {
  transform: scale(1.03);
}

.case-card-content {
  flex: 1;
}

/* Maintain hover effects same as original cards */
.case-card-horizontal a:hover,
.case-card-horizontal a:focus,
.case-card-horizontal a:visited,
.case-card-horizontal a:active {
  color: inherit;
  text-decoration: none;
  background: none;
}

/* Responsive behavior - revert to vertical layout on mobile */
@media (max-width: 720px) {
  .case-card-horizontal {
    flex-direction: column;
    gap: 1rem;
  }
  
  .case-card-image, 
  .case-card-content {
    width: 100%;
  }
}

/* Case studies */

.case-header {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.case-ui-video-frame {
  margin-bottom: 6rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.case-ui-video-box {
  margin: auto;
}

.case-ui-video {
  border-radius: 36px;
  max-height: 480px;
}

.case-ui-copy {
  width: 50%;
  border-radius: 40px
}

@media (max-width: 600px) {
  .case-ui-video-frame {
    display: flex;
  flex-direction: column;}
  
  .case-ui-copy {
    width: 100%;
    border-radius: 40px
  }
}

/* Project brief layout*/

.brief {

}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}


/* Adjust case header for smaller screens */

@media (max-width: 820px) {
  .case-header {
    grid-template-columns: 1fr;
  }
}

.brief ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.brief ul li {
}

/* Grids */
.two-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 600px) {
  .two-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  }

.three-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.four-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 600px) {
  .two-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 600px) {
  .four-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


@media (max-width: 600px) {
  .three-grid {
    grid-template-columns: 1fr;
}
}

/* Tables */

table {
  text-align: left;
  border-spacing: 0;
  table-layout: fixed;
}

table p {
}

th, td {
  font-weight: 400;
  vertical-align: top;
  padding: 0 2rem 0 0;
  border-color: var(--color-border-gray);
  border-style: solid;
  border-width: 0.75px 0 0 0;
}
