:root {
  --bg: #e9eee9;
  /* Text: black at 90% opacity; underline: black at 50% opacity */
  --text: rgba(0,0,0,0.9);
  --underline: rgba(0,0,0,0.4);
  --max-width: 1400px;
}

/* Ranade webfont (placed in assets/) */
@font-face {
  font-family: 'Ranade';
  /* use the actual file present in the assets folder */
  src: url('Ranade-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

/* customize scrollbars so they match the site colors */
html {
  /* firefox */
  scrollbar-width: auto;
  scrollbar-color: var(--underline) var(--bg);
}

/* webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background-color: var(--underline);
  border-radius: 8px;
  border: 4px solid var(--bg); /* give some padding */
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text);
}

/* Preview Tooltip */
.preview-tooltip {
  position: fixed;
  width:320px;
  height: auto;
  max-height: 70vh;
  background: var(--bg);
  z-index: 999;
  display: none;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  padding: 2px;
}

.preview-tooltip img {
  width: 100%;
  height: auto;
  display: block;
  object-position: top center;
}

@media (any-hover: none) {
  .preview-tooltip {
    display: none !important;
  }
}

/* Hide focus underline for non-keyboard interactions (touch/mouse).
   Keep focus visible for keyboard users via :focus-visible. */
a:focus:not(:focus-visible) {
  outline: none;
  text-decoration: none;
}

/* On touch devices (coarse pointer or no-hover), don't show underline on tap/select. */
@media (pointer: coarse), (any-hover: none) {
  a,
  a:active,
  a:focus,
  a:focus-visible,
  a:hover {
    text-decoration: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }

  /* Project-title links normally get underlines on focus/hover — suppress on touch. */
  .projects h2 a:focus-visible,
  .projects h2 a:hover {
    text-decoration: none !important;
    border-bottom: none !important;
  }
}

/* Set the root font-size so 1rem is predictable site-wide */
html {
  font-size: 20px;
  /* desktop root — mobile override handled in media query */
}

body {
  margin: 0;
  font-family: 'Lekton', system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.4;
  background: var(--bg);
}



/* ------------------------------------------------
   Main Grid Layout
   ------------------------------------------------ */
.grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 3rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

/* ------------------------------------------------
   Left Column: Sticky Container
   ------------------------------------------------ */
.col-left {
  position: sticky;
  top: 3rem;
  align-self: start;
  /* Prevents stretching to full grid height */

  /* Handle internal scrolling only if needed (content too tall) */
  overflow-y: auto;
  scrollbar-width: none;
}

.col-left::-webkit-scrollbar {
  display: none;
}


/* ------------------------------------------------
   Right Column: Projects
   ------------------------------------------------ */
.col-right {
  min-width: 0;
  /* prevent grid blowout */
}

/* Spacer: invisible copy pushing content down */
.spacer {
  visibility: hidden;
  /* Hide visually */
  pointer-events: none;
  /* No interaction */
  user-select: none;
  /* Make sure spacing/margins match the real elements exactly */
}

/* ------------------------------------------------
   Typography & Spacing
   ------------------------------------------------ */
.header {
  margin-bottom: 2rem;
}

.intro {
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 3.75rem;
  margin: 0 0 0;
  font-weight: 400;
}

h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  margin: 0 0 0.5rem;
  font-weight: 400;
}

/* Right-column headings align tightly with project list */
.col-right h2 {
  margin-bottom: 0;
}

p {
  margin: 0 0 0.5rem;
}

/* Prevent small inline pieces (nicknames, acronyms) from breaking */
.no-break {
  white-space: nowrap;
}


a {
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 0.3em;
}

/* Project description links and email links should use a subtle dotted underline */
.project-desc a,
.contact a,
a[href^="mailto:"] {
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  transition: text-decoration-color 150ms ease;
}


.project-desc a:hover,
.contact a:hover,
a[href^="mailto:"]:hover {
  text-decoration-style: solid;
  text-decoration-color: var(--text);
}

/* Project List */
.projects {
  list-style: none;
  padding: 0;
  margin: 0;
}

.projects li {
  padding: 0 0 2rem;
}

/* Make each project title a heading; the link inside will take the visual styles */
.projects h2 {
  font-size: 2rem;
  position: relative; /* for any decorative pseudo-element if needed */
  margin: 0; /* reset default heading margin */
  text-transform: none; /* override base h2 uppercase */
  letter-spacing: normal; /* override base h2 letter-spacing */
}

.projects h2 a {
  display: inline-block;
  text-decoration:none;
  color: inherit;
}


.projects h2 a:hover,
.projects h2 a:focus-visible {
  text-decoration: underline solid;
  text-underline-offset: 0.2rem;
  text-decoration-thickness: 2px;
  /* slightly transparent underline color */
  text-decoration-color: var(--text);
}

/* Fallback for browsers that don't support text-decoration-thickness */
@supports not (text-decoration-thickness: 1px) {
  .projects h2 a:hover,
  .projects h2 a:focus-visible {
    text-decoration: none;
    border-bottom: 1px solid var(--text);
    padding-bottom: 0.06rem; /* prevent visual jump */
  }
}

/* Use Ranade for specifically marked project names */
.font-voro-studio,
.font-vorodoro {
  font-family: 'Ranade';
}

/* Rick/Libre Baskerville (serif) */
.font-rick {
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-size: 1.7rem !important;
}

/* Sevenly project name */
.font-sevenly {
  font-family: 'Outfit';
  font-weight: 500;
}

.store-badge {
  height: 32px;
  vertical-align: bottom;
  margin-bottom: 0.5rem;
  opacity: 0.8;
  transition: opacity 150ms ease;
}

.store-badge:hover {
  opacity: 1;
}

/* Rocks & Pebbles project name */
.font-rocks-pebbles {
  font-family: 'EB Garamond';
  font-weight: 500;
}

/* methodmethod project name */
.font-methodmethod {
  font-family: 'Unbounded';
  font-weight: 500;
}

/* mrtn.design project name */
.font-mrtn-design {
  font-family: 'Hanken Grotesk';
}

/* martin-konrad.com project name */
.font-martin-konrad {
  font-family: 'Instrument Sans';
  font-weight: 550;
}

/* Writing Instrument Clip project name */
.font-writing-instrument-clip {
  font-family: 'Courier Prime';
  font-weight: 400;
  line-height: 1.1;
}

/* Two Emotions project name */
.font-two-emotions {
  font-family: 'Cormorant';
  font-weight: 500;
  font-size: 2.5rem;
  line-height: 1.2;
}

/* Juna book project name */
.font-juna {
  font-family: 'Amatic SC';
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.1;
}

/* Highbrow & Brilliant project name */
.font-highbrow-brilliant {
  font-family: 'DM Serif Display';
  font-weight: 400;
}

/* Fast Company project name */
.font-fastcompany {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
}


/* ------------------------------------------------
   Responsive Breakpoints
   ------------------------------------------------ */


@media (max-width: 880px) {
  html {
    font-size: 16px;
  }
    /* Smaller app-store badges on tablet and smaller */
  .store-badge {
    height: 28px;
  }

}

@media (max-width: 650px) {
  html {
    font-size: 14px;
  }


  .grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 1rem 1rem 3rem;
    margin-top: 1rem;
  }

  .col-left {
    position: static;
    /* Unstick */
    align-self: auto;
    max-height: none;
    overflow-y: visible;
  }

  .projects li {
    padding: 0 0 1rem;
  }

  /* Smaller app-store badges on tablet and smaller */
  .store-badge {
    height: 24px;
  }

  /* Hide the spacer since columns stack */
  .spacer {
    display: none;
  }
}

@media (max-width: 400px) {
  html {
    font-size: 12px;
  }
}