/* =========================
   CSS VARIABLES
========================= */
:root {
  --bg: #0a0f14;
  --panel: #0f172a;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
}

/* =========================
   BASE
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =========================
   BACKGROUND
========================= */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'>\
    <rect x='20' y='30' width='4' height='4' fill='rgba(56,189,248,0.35)'/>\
    <rect x='90' y='60' width='6' height='6' fill='rgba(56,189,248,0.25)'/>\
    <rect x='150' y='120' width='3' height='3' fill='rgba(56,189,248,0.3)'/>\
    <rect x='60' y='160' width='5' height='5' fill='rgba(56,189,248,0.2)'/>\
  </svg>");
  background-size: 220px 220px;
  animation: nodeDrift 80s linear infinite;
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    transparent 40%,
    rgba(10, 15, 20, 0.9) 75%
  );
}

@keyframes nodeDrift {
  from { background-position: 0 0; }
  to   { background-position: 400px 300px; }
}

/* =========================
   NAVIGATION
========================= */
header.nav {
  position: sticky;
  top: 0;
  z-index: 2;
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
}


.nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
}

.nav nav {
  display: flex;
  gap: 2rem;
}


.nav a:hover {
  color: var(--accent);
}

/* =========================
   ICON
========================= */

.socials {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.socials a {
  width: 40px;
  height: 40px;
  color: var(--muted);
  opacity: 0.75;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.socials a:hover {
  color: var(--accent);
  opacity: 1;
  transform: translateY(-2px);
}

.socials svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* =========================
   MAIN LAYOUT
========================= */
main {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* =========================
   HERO
========================= */
.hero {
  text-align: center;
  margin-bottom: 4rem;
  animation: fadeIn 0.8s ease forwards;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
}

/* =========================
   SHARED CONTENT COLUMN
========================= */
.content {
  max-width: 720px;
  margin: 0 auto;
}

/* =========================
   ABOUT PAGE
========================= */
.about {
  animation: fadeIn 0.8s ease forwards;
}

.about p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.about strong {
  font-weight: 600;
  color: var(--text);
}

/* =========================
   DIVIDER
========================= */
.divider {
  border: none;
  height: 1px;
  background: rgba(56, 189, 248, 0.25);
  margin: 3rem 0;
}

/* =========================
   CONTACT
========================= */
.contact h2 {
  margin-bottom: 1rem;
  animation: fadeIn 0.8s ease forwards;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  animation: fadeIn 0.8s ease forwards;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.contact-list span {
  min-width: 70px;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-list a {
  color: var(--accent);
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

/* =========================
   TILES (LANDING)
========================= */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
  animation: fadeIn 0.8s ease forwards;
}

.tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 1px var(--accent),
    0 0 25px rgba(56, 189, 248, 0.25);
}

/* =========================
   PROJECTS
========================= */
.projects-page {
  max-width: 800px;
  margin: 0 auto;
}

.projects-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  animation: fadeIn 0.8s ease forwards;
}

.project-tile {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  transition: all 0.25s ease;
}

.project-tile:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.25);
}

.project-action {
  align-self: flex-start;
}

.project-content h2 {
  margin: 0 0 0.5rem;
}

.project-content p {
  margin: 0 0 0.75rem;
}

.project-content {
  flex: 1;
  text-align: left;
}

.project-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.project-tile:hover .project-link {
  transform: translateX(4px);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.lang-tag {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}


/* =========================
   ANIMATIONS
========================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: none; }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 700px) {
  .tiles {
    grid-template-columns: 1fr;
  }

  .project-tile {
    flex-direction: column;
  }

  .project-content {
    max-width: 100%;
  }
}
