/* Base / layout */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: system-ui, Arial, Helvetica, sans-serif; color: #222; background: #fff; line-height: 1.6; }
.wrap { width: min(1100px, 92vw); margin: 0 auto; }

/* Top nav pills */
.topbar { position: sticky; top: 0; background: #fff; border-bottom: 1px solid #e6e6e6; z-index: 10; }
.nav { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 0; }
.nav a { border: 1px solid #ddd; border-radius: 999px; padding: 8px 14px; text-decoration: none; color: #222; background: #fff; }
.nav a:hover { background: #efefef; }
.bar{
    display:flex; align-items:center; justify-content:space-between; gap:16px; padding:8px 0;
  }
  .brand{
    display:inline-block; border:1px solid #ddd; border-radius:999px; padding:8px 14px;
    text-decoration:none; color:#222; background:#fff; font-weight:700; letter-spacing:.5px;
  }
  .brand:hover{ background:#efefef; }
  
  /* was .nav {...} and .nav a {...} */
  .topnav{ display:flex; gap:10px; justify-content:flex-end; }
  .topnav a{
    border:1px solid #ddd; border-radius:999px; padding:8px 14px; text-decoration:none; color:#222; background:#fff;
  }
  .topnav a:hover{ background:#efefef; }
  

/* Sections */
.section { padding: 48px 0; }
.title { font-size: 2rem; margin-bottom: 10px; text-align: center; }
.subtitle { font-size: 1.4rem; margin-bottom: 16px; }
.lead { color: #555; max-width: 60ch; }

/* Grid (neutral boxes, no images) */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .work-grid { grid-template-columns: 1fr; } }

.work-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer;
  border: 1px solid #d9d9d9; border-radius: 12px; padding: 14px; background: #f4f4f4; }
.work-card:focus { outline: 3px solid #9ad; }
.work-thumb { height: 120px; border: 1px dashed #cfcfcf; border-radius: 8px; background: #eaeaea; } /* neutral placeholder only */
.work-meta h3 { font-size: 1rem; color: #333; }
.work-meta .desc { font-size: .9rem; color: #555; }

/* Detail panels */
.hidden { display: none; }
.work-detail { padding: 24px 0; border-top: 1px solid #eee; }
.work-detail-wrap { padding: 18px; border: 1px solid #e3e3e3; border-radius: 12px; background: #fafafa; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.info .item { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.info .icon { font-size: 22px; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form input, .form textarea { padding: 10px; border: 1px solid #bbb; border-radius: 8px; background: #fff; }
.form textarea { min-height: 120px; resize: vertical; }
.form button { padding: 10px 14px; border: 0; border-radius: 8px; background: #333; color: #fff; cursor: pointer; }
.form button:hover { background: #555; }

/* Skills */
.skills-icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.skills-icons > div { height: 56px; background: #ececec; border: 1px solid #dadada; border-radius: 12px; }

/* Footer */
.foot { padding: 24px 0 56px; color: #777; text-align: center; }


.hidden { display: none; }

/* Make top bar wrap nicely on very small screens */
.bar { flex-wrap: wrap; }
.topnav, .nav { flex-wrap: wrap; row-gap: 8px; }

/* Reduce side padding & section spacing on small devices */
@media (max-width: 480px) {
  .wrap { width: min(1100px, 94vw); }
  .section { padding: 36px 0; }
  .brand { padding: 6px 12px; }
  .topnav a, .nav a { padding: 6px 12px; }
}

/* Auto-fit project cards for smoother steps at many widths */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

/* Auto-fit skills icons so they don’t get too tiny */
.skills-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 12px;
}

/* Ensure detail panel content doesn’t overflow small screens */
.work-detail-wrap { overflow-wrap: anywhere; }

.form {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.form input, .form textarea {
  border: 1px solid #ccc;
  transition: 0.2s ease;
}

.form input:focus, .form textarea:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

