/* Hero Section */
.hero { padding: 6rem 0 5rem; }
.hero-grid { 
  display: block;
  max-width: 800px;
}
.hero h1 { font-size: clamp(3rem, 8vw, 4.25rem); font-weight: 800; line-height: 1.05; margin-bottom: 1rem; }
.tagline { font-size: 1.1rem; color: var(--muted); margin-bottom: 1.75rem; }
.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; }

/* About Section */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 2.5rem; }

/* Projects Section */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 1.75rem; }
.project-card { position: relative; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-height: 100%; background: var(--bg); transition: transform .25s, box-shadow .25s; }
.project-card:hover { transform: translateY(-6px); box-shadow: 0 8px 20px rgba(0,0,0,.06); }
.card-link { position: absolute; inset: 0; z-index: 1; }
.project-img { width: 100%; height: 160px; object-fit: cover; background: #f2f2f2; }
.project-body { padding: 1.25rem 1.25rem 3.25rem; flex-grow: 1; }
.project-body h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.project-body p { font-size: .9rem; margin-bottom: .75rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { background: var(--chip-bg); padding: .25rem .8rem; border-radius: 9999px; font-size: .7rem; color: var(--fg); border: 1px solid var(--border); }
.repo-icon { position: absolute; right: .8rem; bottom: .8rem; z-index: 2; }
.repo-icon i {
  font-size: 24px;
  color: var(--muted);
  transition: color .2s, transform .2s;
}
.project-card:hover .repo-icon i {
  color: var(--fg);
  transform: translateX(2px);
}
.more-projects { text-align: center; margin-top: 2.5rem; }

/* Current Work Section */
.current-box { border: 1px solid var(--border); padding: 1.75rem; border-radius: 12px; margin: 0; text-align: center; }
.see-more { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 500; text-decoration: none; margin-top: 1.25rem; color: var(--fg); }
.see-more svg { width: 16px; height: 16px; stroke: currentColor; transition: transform .2s ease; }
.see-more:hover svg { transform: translateX(3px); }

.current-work-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  align-items: center;
}

.current-image {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

.current-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.contact-buttons { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; position: relative;}
.icon-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; font-size: .9rem; border: 1px solid var(--fg); border-radius: 6px; text-decoration: none; color: var(--fg); transition: background .2s, color .2s; cursor: pointer; }
.icon-btn:hover { background: var(--fg); color: var(--bg); }

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  z-index: 1100;
  background-color: transparent;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal .modal-content {
  position: relative;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  width: 90%;
  max-width: 460px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: auto;
  overflow-y: auto;
  max-height: 90vh;
}

.modal.open .modal-content {
  opacity: 1;
  transform: translateY(0);
}

.modal.closing .modal-content {
  opacity: 0;
  transform: translateY(20px);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal h3 {
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  border: 1px solid var(--fg);
  border-radius: 6px;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

/* Responsive adjustments */
@media (min-width: 860px) { 
  .hero-grid {
    grid-template-columns: 1fr; 
  }
}

@media (max-width: 768px) {
  .current-work-grid {
    grid-template-columns: 1fr;
  }
  
  .current-image {
    margin-bottom: 1rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  .modal .modal-content {
    padding: 1.25rem;
    width: 95%;
  }
  
  .close-modal {
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
  }
  
  .modal-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .modal-btn, .copy-btn {
    padding: 0.75rem 1rem;
    width: 100%;
  }
  
  .modal p {
    word-break: break-word;
  }
}

    .json-card {
      background:#0d1117; /* GitHub dark */
      color:#c9d1d9;
      padding:1.25rem 1.5rem;
      border-radius:8px;
      font-family: "Fira Code", "Courier New", monospace;
      font-size:.9rem;
      line-height:1.45;
      overflow-x:auto;
      box-shadow:0 2px 4px rgba(0,0,0,.15);
      margin-top:2rem;
      border:1px solid #161b22;
      position:relative;
    }
    /* little coloured keys like in VS Code */
    .json-card .k {color:#79c0ff;}   /* keys */
    .json-card .s {color:#a5d6ff;}   /* strings */
    .json-card .n {color:#ffa657;}   /* numbers */
    .json-card .p {color:#c9d1d9;}   /* punctuation */

/* Interpres App Screens hover zoom */
.app-screens { position: relative; overflow: visible; z-index: 10; }
.app-screens.section { padding: 0; } /* no vertical padding */
.app-screens .sm-title { margin: 0; }
.app-screens .container { overflow: visible; }
.app-screens .info-grid { position: relative; align-items: center; overflow: visible; gap: 0.5rem; margin-top: -1.25rem; margin-bottom: -1.25rem; }
.app-screens .sm-title { line-height: 1; }
.app-screens .current-image { margin: 0; }
.app-screens .current-image img { display: block; }
.app-screens .current-image { position: relative; z-index: 0; }
.app-screens .current-image img {
  transition: transform .35s ease, box-shadow .35s ease, filter .35s ease;
  border-radius: 8px;
  transform-origin: center center;
}

.app-screens .current-image:hover { z-index: 20; }
.app-screens .current-image:hover img {
  transform: scale(1.8);
  box-shadow: 0 30px 100px rgba(0,0,0,0.35);
  z-index: 1000;
  position: relative;
  filter: none;
}

@media (max-width: 768px) {
  .app-screens .current-image:hover img { transform: scale(1.35); }
}

/* High-quality base rendering: render larger and downscale initially */
.app-screens .current-image img.hq {
  width: 220%;
  max-width: none;
  transform: scale(0.455);
}
.app-screens .current-image:hover img.hq {
  transform: scale(1.18); /* ~2.6x effective of container */
}
@media (max-width: 768px) {
  .app-screens .current-image img.hq { transform: scale(0.6); }
  .app-screens .current-image:hover img.hq { transform: scale(0.9); }
}

/* Lightbox for crisp full-size preview */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.lightbox-backdrop.active { display: flex; }
.lightbox-image {
  max-width: min(96vw, 1600px);
  max-height: 92vh;
  border-radius: 10px;
  box-shadow: 0 20px 80px rgba(0,0,0,.45);
  transform: scale(.98);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.lightbox-backdrop.active .lightbox-image { transform: scale(1); opacity: 1; }

/* Make thumbnails feel interactive */
.app-screens .current-image { cursor: zoom-in; }