:root{
  --max-width:720px;
  --muted:#666;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  font-family: 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial;
  margin:0;
  color:#111;
  background:#fff;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.container{
  max-width:var(--max-width);
  margin-left:auto;
  margin-right:auto;
  padding:80px 24px;
}

.site-header{
  margin-bottom:0;
}

.name{
  font-weight:600;
  font-size:clamp(22px, 1.378rem + ((1vw - 3.2px) * 1.369), 36px);
  margin:0;
}

.columns{
  display:flex;
  flex-wrap:nowrap;
  gap:0;
  justify-content:space-between;
  align-items:center;
  margin-bottom:0;
  margin-top:0;
}

.nav-col{
  flex:1;
}

.links-col{
  flex:1;
}

.col-title{
  font-size:clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.196), 16px);
  color:var(--muted);
  margin:0;
  font-weight:600;
}

.nav-list, .links-list{
  list-style:none;
  padding:0;
  margin:0;
}

.nav-list li, .links-list li{
  margin:0;
}


.nav-list a {
  text-decoration: none;
  color: var(--muted);
  font-size: clamp(22px, 1.378rem + ((1vw - 3.2px) * 1.369), 36px);
  line-height: 1.2;
  position: relative;
  display: inline-block;
  padding-left: 0;
  transition: color 0.2s, padding-left 0.3s;
}

/* Home page: default to black instead of muted */
.home .nav-list a {
  color: #111;
}

.nav-list a.active-page,
.nav-list a:hover {
  color: #111;
}

.nav-list a.active-page.muted {
  color: var(--muted);
}


.links-list a {
  text-decoration: none;
  color: #111;
  font-size: clamp(22px, 1.378rem + ((1vw - 3.2px) * 1.369), 36px);
  line-height: 1.2;
  position: relative;
  display: inline-block;
  padding-left: 0;
  transition: color 0.2s, padding-left 0.3s;
}

/* Home page: default to black instead of muted */
.home .links-list a {
  color: #111;
}

.links-list a:hover {
  color: #111;
}

/* Mute effect when other items are hovered */
.home .nav-list a.muted-hover,
.home .links-list a.muted-hover {
  color: var(--muted);
}

/* Links column mute effect on all pages */
.links-list a.muted-hover {
  color: var(--muted);
}

.nav-list a::before, .links-list a::before{
  content:'→';
  position:absolute;
  left:0;
  opacity:1;
  clip-path:inset(0 100% 0 0);
  transition:clip-path 0.3s ease;
}

.nav-list a:hover, .links-list a:hover{
  padding-left:1em;
}

.nav-list a:hover::before, .links-list a:hover::before{
  clip-path:inset(0 0 0 0);
}

/* Active page indicator - keeps arrow extended */
.nav-list a.active-page {
  padding-left: 1em;
}

.nav-list a.active-page::before {
  clip-path: inset(0 0 0 0);
}

/* Retract arrow when other links are hovered */
.nav-list a.active-page.retracted {
  padding-left: 0;
}

.nav-list a.active-page.retracted::before {
  clip-path: inset(0 100% 0 0);
}

.email-link {
  position: relative;
}

.email-link::after {
  content: attr(data-email);
  position: absolute;
  left: calc(100% + 0.5em);
  bottom: 0.1em;
  opacity: 1;
  color: var(--muted);
  font-size: 0.7em;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.2;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.3s ease;
}

.email-link:hover::after {
  clip-path: inset(0 0 0 0);
}

.bio{
  margin-top:0;
  margin-bottom:0;
}

.bio p{
  font-size:clamp(22px, 1.378rem + ((1vw - 3.2px) * 1.369), 36px);
  line-height:1.2;
  color: #222;
  margin:0;
}

.typewriter {
  font-size:clamp(22px, 1.378rem + ((1vw - 3.2px) * 1.369), 36px);
  line-height:1.2;
  color: #222;
  margin:0;
  font-family: inherit;
  letter-spacing: 0.01em;
  white-space: pre-wrap;
}

.cursor {
  display: inline-block;
  width: 0.7em;
  height: 1em;
  background: #111;
  vertical-align: middle;
  margin-left: 2px;
  margin-bottom: 2px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.spacer{
  clear:both;
}

/* Resources page styles */
.filter-section {
  margin-bottom: 0;
}

.load-animation {
  opacity: 0;
  transform: translateY(-20px);
  animation: slideDown 0.6s ease forwards;
}

.filter-section.load-animation {
  animation-delay: 0.1s;
}

.resources-list.load-animation {
  animation-delay: 0.3s;
}

@keyframes slideDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.tag-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: clamp(22px, 1.378rem + ((1vw - 3.2px) * 1.369), 36px);
  line-height: 1.2;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: color 0.2s ease;
  position: relative;
  display: inline-block;
}

.tag-btn:hover {
  color: #111;
}

.tag-btn.active {
  color: #111;
}

.tag-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #111;
}

.resources-list {
  margin-top: 0;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
}

.resource-card {
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 0.2s ease;
  cursor: pointer;
  overflow: visible;
}

.resource-card.load-animation {
  opacity: 0;
  transform: translateY(-20px);
  animation: slideDown 0.6s ease forwards;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: visible;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  position: relative;
}

.card-link:hover {
  border-color: #111;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Remove card highlight when triangle is hovered */
.card-link:has(.card-download-btn:hover) {
  border-color: #e0e0e0;
  box-shadow: none;
}

.card-download-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 58px;
  height: 58px;
  background: #7b7b7b;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, width 0.2s ease, height 0.2s ease;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  border-radius: 0 0 4px 0;
  transform-origin: bottom right;
}

.card-download-btn:hover {
  background: #e2e2e2;
  width: 54px;
  height: 54px;
}

.card-download-btn svg {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: block;
  color: #fff;
  pointer-events: none;
}

.card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: url('images/default_card.png');
  background-size: cover;
  background-position: center;
  border-radius: 4px 4px 0 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 16px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.3;
  color: #111;
}

.card-description {
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tag {
  font-size: 12px;
  color: var(--muted);
  text-transform: lowercase;
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 3px;
}

/* Remove old resource list styles */
.resource-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (max-width:300px){
  .columns{
    flex-direction:column;
    flex-wrap:wrap;
    gap:20px;
    align-items:flex-start;
  }
  .container{padding:40px 18px}
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: #fff;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 8px;
  z-index: 1001;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  z-index: 10;
}

.modal-close:hover {
  color: #111;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}

.modal-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: url('images/default_card.png');
  background-size: cover;
  background-position: center;
  border-radius: 4px;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-info h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  color: #111;
  padding-right: 40px;
}

.modal-info p {
  font-size: 16px;
  line-height: 1.6;
  color: #444;
  margin: 0;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-download-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #7b7b7b;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s;
  text-align: center;
  cursor: pointer;
  align-self: flex-start;
}

.modal-download-btn:hover {
  background: #f5f5f5;
}

@media (max-width: 600px) {
  .modal-body {
    padding: 20px;
  }
  
  .modal-image {
    height: 200px;
  }
  
  .modal-info h2 {
    font-size: 22px;
  }
}
