:root {
  --bg: #0b1f28;
  --surface: #0f2733;
  --muted: #b2c0ca;
  --accent: #6fc7ff;
  --card: #12252f;
  --glass: rgba(255, 255, 255, 0.06);
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: #f3fbff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-wrapper {
  max-width: var(--max-width);
  margin: 40px auto;
  padding: 28px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

/* Ensure the header nav uses a small gap between buttons */
.main-nav {
  display: flex;
  gap: 10px;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.main-nav a:hover {
  background: var(--glass);
  color: #fff;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
}

.site-title {
  font-weight: 700;
  font-size: 20px;
}

.site-nav {
  display: flex;
  gap: 12px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a:hover {
  background: var(--glass);
  color: #fff;
}

.hero {
  display: flex;
  align-items: center;
  gap: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  padding: 36px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.hero-left {
  flex: 1;
}

.hero-title {
  font-size: 48px;
  line-height: 1.02;
  margin-bottom: 8px;
}

.hero-sub {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 18px;
}

.hero-cta {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.btn {
  background: var(--accent);
  color: #042032;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
}

.btn.secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
}

.hero-right {
  width: 220px;
  flex-shrink: 0;
}

.hero-card {
  background: var(--card);
  padding: 14px;
  border-radius: 10px;
  text-align: center;
}

.section {
  margin-top: 28px;
}

/* Add consistent vertical spacing between main sections */
main {
  display: block;
}

main > section {
  margin: 48px 0;
}

.section-title {
  font-size: 28px;
  margin-bottom: 12px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--card);
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  display: flex;
  gap: 18px;
  align-items: center;
}

.project-card img {
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.project-thumb {
  width: 140px;
  height: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.project-info {
  flex: 1;
}

.project-info h3 {
  margin: 0 0 8px 0;
}

.project-info p {
  margin: 0 0 12px 0;
  color: var(--muted);
}

.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tag {
  background: rgba(255,255,255,0.03);
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.project-actions {
  margin-top: 6px;
}

.project-actions .btn {
  padding: 9px 14px;
  border-radius: 8px;
}

@media (max-width: 680px) {
  .project-card {
    flex-direction: column;
    align-items: stretch;
  }

  .project-thumb {
    width: 100%;
    height: 140px;
  }
}

.project-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.project-card p {
  color: var(--muted);
  font-size: 13px;
}

.project-logo {
  display: block;
  max-width: 180px;
  height: auto;
  margin: 0 auto 12px auto;
  padding: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
}

.project-card a:hover .project-logo {
  transform: scale(1.02);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-top: 8px;
  align-items: stretch; /* ensure equal-height cards */
}

.skill-link {
  display: block;
}

.skill-card {
  background: linear-gradient(180deg, var(--glass), transparent);
  padding: 16px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform .18s ease, box-shadow .18s ease;
  min-height: 120px; /* make boxes visually larger */
  height: 100%;
  text-align: center;
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.skill-icon {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.skill-icon img {
  max-width: 80%;
  max-height: 80%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.skill-name {
  font-weight: 600;
  color: #fff;
}

/* Force exactly 4 columns on wider screens for a neat 4x4 layout */
@media (min-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.contact-card {
  background: var(--card);
  padding: 18px;
  border-radius: 10px;
}

.contact-list {
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  margin-top: 26px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-right {
    width: 100%;
    order: 2;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }

  .site-wrapper {
    padding: 16px;
    margin: 20px;
  }
}

@media (max-width: 680px) {
  main > section {
    margin: 28px 0;
  }
}