@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Orbitron:wght@500&display=swap');

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at center, #0a001a 0%, #000 100%);
  color: #fff;
  overflow-x: hidden;
}

/* ===== Animated Parallax Background ===== */
#background {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(90,0,255,0.3) 0%, transparent 70%),
              radial-gradient(circle at 80% 20%, rgba(0,200,255,0.15) 0%, transparent 70%),
              radial-gradient(circle at 20% 80%, rgba(255,0,120,0.15) 0%, transparent 70%);
  animation: floatBG 25s ease-in-out infinite alternate;
}

@keyframes floatBG {
  0% { transform: translateY(0) scale(1); filter: hue-rotate(0deg); }
  100% { transform: translateY(-40px) scale(1.05); filter: hue-rotate(360deg); }
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  animation: floatParticle linear infinite;
}

@keyframes floatParticle {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-100vh) scale(1.5); opacity: 0; }
}

/* ===== HEADER ===== */
header {
  text-align: center;
  padding: 100px 20px 50px;
}

header img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid #6a00ff;
  box-shadow: 0 0 20px #6a00ff;
  margin-bottom: 15px;
}

header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2em;
  margin: 0;
}

header p {
  color: #aaa;
  font-size: 1.1em;
}

.typewriter {
  display: inline-block;
  border-right: 2px solid #fff;
  white-space: nowrap;
  overflow: hidden;
  animation: typing 4s steps(30, end), blink 0.6s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes blink {
  50% { border-color: transparent; }
}

/* ===== PROJECTS ===== */
section {
  padding: 50px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

section h2 {
  font-family: 'Orbitron', sans-serif;
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 30px;
  color: #8a63ff;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.project {
  background: rgba(255,255,255,0.05);
  border-radius: 15px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: 0.4s;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 25px rgba(0,0,0,0.3);
}

.project h3 {
  color: #fff;
  margin-top: 0;
}

.project p {
  color: #aaa;
  font-size: 0.9em;
}

.project:hover {
  transform: translateY(-5px) scale(1.02);
  background: rgba(120,0,255,0.25);
  box-shadow: 0 0 25px rgba(120,0,255,0.6);
}

/* ===== MODAL (POPOUT) ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: rgba(25, 0, 50, 0.95);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 15px;
  margin: 10% auto;
  padding: 25px;
  max-width: 600px;
  color: #fff;
  font-size:14px;
  box-shadow: 0 0 30px rgba(120,0,255,0.6);
  animation: popIn 0.4s ease;
  max-height: 70vh;   /* Περιορίζει το ύψος του modal */
  overflow-y: auto;   /* Ενεργοποιεί το vertical scroll όταν χρειάζεται */
}

/* ===== Modal Images Fix for Mobile ===== */
.modal-content img {
  max-width: 100%;     /* Πλάτος εικόνας ≤ πλάτος modal */
  height: auto;        /* Διατηρεί αναλογίες */
  display: block;      /* Κάθε εικόνα σε νέα γραμμή */
  margin: 15px auto;   /* Κεντράρισμα και απόσταση */
  border-radius: 10px; /* Προαιρετικό, για ωραίο look */
  box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-content img {
  max-width: 100%;     /* Πλάτος εικόνας ≤ πλάτος modal */
  height: auto;        /* Διατηρεί αναλογίες */
  display: block;      /* Κάθε εικόνα σε νέα γραμμή */
  margin: 15px auto;   /* Κεντράρισμα και απόσταση */
  border-radius: 10px; /* Προαιρετικό, για ωραίο look */
  box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.close {
  float: right;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
}
.close:hover {
  color: #8a63ff;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== READ MORE BUTTON ===== */
.read-more {
  display: inline-block;
  margin-top: 10px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.85em;
  text-decoration: none;
  transition: 0.3s;
}
.read-more:hover {
  transform: translateY(-5px) scale(1.02);
  background: rgba(120,0,255,0.25);
  box-shadow: 0 0 25px rgba(120,0,255,0.6);
}
.read-more-container {
  text-align: right; /* Βάζει το κουμπί δεξιά */
  margin-top: auto;  /* Απόσταση από το κείμενο */
}

/* ===== SOCIAL GRID ===== */

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 100px);
  grid-template-rows: repeat(2, 100px);
  gap: 25px;
  justify-content: center; /* Κέντρο οριζόντια */
  align-content: center;  /* Κέντρο κάθετα */
  text-align: center;
  margin: 0 auto;
  padding-top: 20px;
}

.social-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: 0.3s;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.social-item:hover {
  background: rgba(120, 0, 255, 0.25);
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(120, 0, 255, 0.6);
}

.social-item img {
  width: 40px;
  height: 40px;
}

.social-item span {
  font-size: 0.9rem;
  color: #fff;
  margin-top: 5px;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 40px;
  font-size: 0.9em;
  color: #777;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 40px;
}

a {
  color: #8a63ff;
  text-decoration: none;
}
