@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #141414;
  --fg: #fff;
  --muted: #888;
  --border: #fff;
  --hover: #222;
}

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

body {
  font-family: "IBM Plex Mono", monospace;
  background: var(--bg);
  color: var(--fg);
  font-size: 12px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Static Grid Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  pointer-events: none;
}

header {
  background: var(--bg);
  color: var(--fg);
  padding: 30px;
  border-bottom: 1px solid var(--border);
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 850px;
  margin: 0 auto;
}

.header-stats {
  display: flex;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.terminal-header {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.prompt-line {
  font-size: 12px;
  margin-bottom: 15px;
}

.user {
  color: var(--fg);
}

.at {
  color: var(--fg);
}

.hostname {
  color: var(--fg);
}

.path {
  color: var(--fg);
}

.cursor {
  color: var(--fg);
  animation: blink 1s infinite;
}

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

.stats-line {
  display: flex;
  gap: 30px;
  font-size: 10px;
  color: var(--muted);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 10px;
  color: var(--muted);
}

.stat-value {
  font-size: 12px;
  color: var(--fg);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 10px 20px 10px;
  flex: 1;
}

.tiles-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  grid-auto-flow: row;
}

/* Social media tiles always at bottom */
.social-tile {
  order: 999;
}

.tile {
  background: var(--bg);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover {
  background: var(--hover);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.tile:hover .tile-icon svg {
  transform: scale(1.2);
  filter: brightness(1.2);
}

.tile:hover .tile-tech {
  opacity: 1;
  transform: translateX(5px);
}

.tile-counter {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  opacity: 0.5;
}

.tile-link {
  display: block;
  padding: 24px;
  text-decoration: none;
  color: inherit;
}

.tile-content {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.tile-icon svg {
  width: 25px;
  height: 25px;
  stroke: var(--border);
  transition: all 0.3s ease;
}

.tile h2 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 4px;
}

.tile p {
  font-size: 12px;
  color: var(--muted);
}

.tile-tech {
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid var(--muted);
  border-radius: 0;
  background: transparent;
  display: inline-block;
  opacity: 0.7;
  transition: all 0.3s ease;
}

footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  position: relative;
  background: var(--bg);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 850px;
  margin: 0 auto;
}

.footer-animation {
  display: flex;
  gap: 8px;
}

.pulse-dot {
  width: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 50%;
  animation: footerPulse 1.5s infinite;
}

.pulse-dot:nth-child(2) {
  animation-delay: 0.3s;
}

.pulse-dot:nth-child(3) {
  animation-delay: 0.6s;
}

/* Animations */
@keyframes footerPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(2.5);
    opacity: 0.5;
  }
}

footer p {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .tiles-section {
    grid-template-columns: 1fr;
  }

  header {
    padding: 20px;
  }

  .stats-line {
    gap: 15px;
    flex-wrap: wrap;
  }

  .tile-tech {
    font-size: 9px;
    padding: 3px 6px;
  }

  main {
    padding: 20px;
  }

  /* Social tiles at bottom in mobile too */
  .social-tile {
    order: 999;
  }
}

@media (min-width: 600px) and (max-width: 900px) {
  .tiles-section {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Social tiles at bottom in tablet too */
  .social-tile {
    order: 999;
  }
}
