/* ============================================================
   Giorgos Chatziparaskevas — Portfolio
   Modern dark theme · vanilla CSS
   ============================================================ */

:root {
  --bg:        #0a0e1a;
  --bg-soft:   #0f1525;
  --bg-card:   #111a2e;
  --border:    #1e2a44;
  --text:      #cdd6f4;
  --text-dim:  #8a96b2;
  --heading:   #e6ecff;
  --accent:    #64ffda;
  --accent-2:  #7c5cff;
  --accent-3:  #ff7eb6;
  --radius:    14px;
  --radius-lg: 22px;
  --maxw:      1080px;
  --shadow:    0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --font:      'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { width: 90%; max-width: var(--maxw); margin: 0 auto; }

/* ---------- Animated background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(124, 92, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(124, 92, 255, 0.18), transparent 45%),
    radial-gradient(700px circle at 85% 20%, rgba(100, 255, 218, 0.10), transparent 50%),
    radial-gradient(600px circle at 50% 100%, rgba(255, 126, 182, 0.10), transparent 45%);
  animation: glow-float 18s ease-in-out infinite alternate;
}
@keyframes glow-float {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(-30px) scale(1.08); }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: all 0.35s ease;
}
.nav--scrolled {
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.nav__brand-mark { color: var(--accent); font-family: var(--mono); font-size: 1.1rem; }
.nav__brand-text { color: var(--heading); letter-spacing: 0.5px; }
.nav__links { display: flex; gap: 30px; }
.nav__links a {
  font-size: 0.92rem; color: var(--text-dim); font-weight: 500;
  position: relative; transition: color 0.2s;
}
.nav__links a:hover { color: var(--accent); }
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.25s ease;
}
.nav__links a:hover::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: 14px; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--accent); border-radius: 2px; transition: all 0.3s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: all 0.25s ease; border: 1px solid transparent;
  white-space: nowrap;
}
.btn--sm { padding: 7px 16px; font-size: 0.85rem; }
.btn--lg { padding: 16px 36px; font-size: 1.05rem; }
.btn--block { width: 100%; margin-top: 18px; }
.btn--primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  color: #fff; box-shadow: 0 10px 30px -10px rgba(124, 92, 255, 0.6);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -10px rgba(124, 92, 255, 0.8); }
.btn--ghost { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn--ghost:hover { background: rgba(100, 255, 218, 0.08); transform: translateY(-3px); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  position: relative; padding-top: 72px;
}
.hero__eyebrow { color: var(--accent); font-family: var(--mono); font-size: 1rem; margin-bottom: 18px; }
.hero__title {
  font-size: clamp(2.5rem, 7vw, 4.8rem); font-weight: 800; color: var(--heading);
  line-height: 1.05; letter-spacing: -1px;
}
.hero__subtitle {
  font-size: clamp(1.6rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.1;
  margin-top: 8px; color: var(--text-dim);
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  background-size: 200% auto; animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.hero__lead { max-width: 600px; margin-top: 26px; font-size: 1.12rem; color: var(--text-dim); }
.hero__lead strong { color: var(--text); }
.hero__cta { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; }
.hero__socials { display: flex; align-items: center; gap: 14px; margin-top: 40px; color: var(--text-dim); font-size: 0.92rem; }
.hero__socials a { font-weight: 500; transition: color 0.2s; }
.hero__socials a:hover { color: var(--accent); }
.hero__scroll {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--text-dim); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px;
}
.hero__scroll-dot { width: 4px; height: 8px; background: var(--accent); border-radius: 2px; animation: scroll-bob 1.6s ease-in-out infinite; }
@keyframes scroll-bob { 0%,100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(10px); opacity: 0.3; } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section__title {
  display: flex; align-items: center; gap: 14px; font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--heading); font-weight: 700; margin-bottom: 50px;
}
.section__title::after {
  content: ''; height: 1px; flex: 1; max-width: 320px; background: var(--border);
}
.section__num { color: var(--accent); font-family: var(--mono); font-size: 1.1rem; font-weight: 500; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 50px; align-items: start; }
.about__text p { margin-bottom: 16px; color: var(--text-dim); }
.about__list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; margin-top: 18px;
}
.about__list li { position: relative; padding-left: 22px; font-family: var(--mono); font-size: 0.88rem; color: var(--text); }
.about__list li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); }
.about__card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px; text-align: center; box-shadow: var(--shadow);
}
.about__avatar {
  width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 10px 30px -8px rgba(124, 92, 255, 0.6);
}
.about__facts { text-align: left; display: grid; gap: 12px; margin-bottom: 6px; }
.about__facts li { color: var(--text-dim); font-size: 0.95rem; }
.about__facts span { margin-right: 8px; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.skill-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform 0.3s ease, border-color 0.3s ease;
}
.skill-card:hover { transform: translateY(-6px); border-color: var(--accent-2); }
.skill-card__icon { font-size: 1.8rem; margin-bottom: 14px; }
.skill-card h3 { color: var(--heading); font-size: 1.2rem; margin-bottom: 8px; }
.skill-card p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 16px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: 0.78rem; padding: 5px 11px; border-radius: 20px;
  background: rgba(124, 92, 255, 0.12); color: var(--accent); border: 1px solid rgba(100, 255, 218, 0.15);
}
.tags--mono li { font-family: var(--mono); background: rgba(255,255,255,0.04); color: var(--text-dim); border-color: var(--border); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--accent-2), var(--accent-3));
}
.timeline__item { position: relative; padding-bottom: 42px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: -30px; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 4px rgba(100,255,218,0.12);
}
.timeline__content {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; transition: border-color 0.3s;
}
.timeline__content:hover { border-color: var(--accent-2); }
.timeline__date { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); }
.timeline__content h3 { color: var(--heading); margin-top: 6px; font-size: 1.18rem; }
.timeline__org { color: var(--accent-2); font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.timeline__content p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 12px; }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.project {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; transition: transform 0.3s, border-color 0.3s;
}
.project:hover { transform: translateY(-8px); border-color: var(--accent); }
.project__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.project__folder { font-size: 1.8rem; }
.project__links a { color: var(--text-dim); font-size: 0.85rem; font-family: var(--mono); transition: color 0.2s; }
.project__links a:hover { color: var(--accent); }
.project__title { color: var(--heading); font-size: 1.3rem; margin-bottom: 10px; }
.project__desc { color: var(--text-dim); font-size: 0.95rem; flex: 1; margin-bottom: 18px; }
.projects__more { text-align: center; margin-top: 36px; color: var(--text-dim); }
.projects__more a { color: var(--accent); font-weight: 600; }

/* ---------- Blog posts ---------- */
.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.post {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; display: block; transition: transform 0.3s, border-color 0.3s;
}
.post:hover { transform: translateY(-6px); border-color: var(--accent-2); }
.post__date { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); }
.post__title { color: var(--heading); font-size: 1.25rem; margin: 8px 0 10px; }
.post__excerpt { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 14px; }
.post__read { color: var(--accent); font-weight: 600; font-size: 0.9rem; }

/* ---------- Contact ---------- */
.section--contact { text-align: center; padding: 130px 0; }
.contact { max-width: 620px; }
.contact__eyebrow { font-family: var(--mono); color: var(--accent); margin-bottom: 16px; }
.contact__title { font-size: clamp(2rem, 6vw, 3.2rem); color: var(--heading); font-weight: 800; margin-bottom: 20px; }
.contact__lead { color: var(--text-dim); font-size: 1.1rem; margin-bottom: 36px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer p { color: var(--text-dim); font-size: 0.88rem; }
.footer__socials { display: flex; gap: 20px; }
.footer__socials a { color: var(--text-dim); font-size: 0.88rem; transition: color 0.2s; }
.footer__socials a:hover { color: var(--accent); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(10, 14, 26, 0.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border); padding: 10px 0;
    transform: translateY(-130%); transition: transform 0.35s ease; align-items: center;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 14px 0; width: 100%; text-align: center; }
  .nav__toggle { display: flex; }
  .about { grid-template-columns: 1fr; }
  .skills, .projects, .posts { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .section { padding: 80px 0; }
  .about__list { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
