:root {
  --background: #f7f7f3;
  --surface: #ffffff;
  --text: #171717;
  --muted: #666666;
  --border: #deded8;
  --accent: #7657ff;
  --accent-dark: #5b3fe3;
  --dark: #17171b;
  --dark-light: #24242a;
  --radius: 22px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 247, 243, 0.92);
  border-bottom: 1px solid rgba(23, 23, 23, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.logo span {
  color: var(--accent);
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation a {
  position: relative;
  color: #484848;
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.main-navigation a:hover,
.main-navigation a.active {
  color: var(--text);
}

.main-navigation a:not(.nav-button)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
  transform: scaleX(1);
}

.nav-button {
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--text);
  color: #ffffff !important;
}

.nav-button:hover {
  background: var(--accent);
}

.menu-toggle {
  display: none;
  width: 45px;
  height: 45px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  transition: 0.25s ease;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 120px;
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: -120px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(118, 87, 255, 0.12);
  filter: blur(30px);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
  align-items: center;
  gap: 80px;
}

.eyebrow,
.section-label {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(3.2rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-text {
  max-width: 660px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--text);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--accent);
}

.button-secondary {
  border-color: var(--border);
  background: transparent;
}

.button-secondary:hover {
  border-color: var(--text);
}

.button-light {
  background: #ffffff;
  color: var(--text);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

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

/* Code box */

.hero-visual {
  position: relative;
}

.code-window {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: #18181d;
  box-shadow: 0 35px 80px rgba(20, 20, 30, 0.22);
  transform: rotate(2deg);
}

.code-window-header {
  min-height: 60px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-window-header p {
  margin: 0 auto;
  color: #9a9aa3;
  font-size: 0.82rem;
}

.window-buttons {
  display: flex;
  gap: 7px;
}

.window-buttons span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.window-buttons span:nth-child(1) {
  background: #ff5f57;
}

.window-buttons span:nth-child(2) {
  background: #febc2e;
}

.window-buttons span:nth-child(3) {
  background: #28c840;
}

.code-content {
  min-height: 420px;
  padding: 52px 38px;
  color: #e6e6ed;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(0.83rem, 1.4vw, 1rem);
  line-height: 1.9;
}

.code-content p {
  margin: 0;
}

.indent {
  padding-left: 28px;
}

.double-indent {
  padding-left: 56px;
}

.code-purple {
  color: #c792ea;
}

.code-blue {
  color: #82aaff;
}

.code-yellow {
  color: #ffcb6b;
}

.code-green {
  color: #c3e88d;
}

.floating-badge {
  position: absolute;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(20, 20, 30, 0.14);
  color: var(--accent);
  font-family: monospace;
  font-size: 1.4rem;
  font-weight: 700;
}

.badge-one {
  top: -34px;
  right: -28px;
  transform: rotate(8deg);
}

.badge-two {
  bottom: -35px;
  left: -35px;
  transform: rotate(-8deg);
}

/* General sections */

.section {
  padding: 110px 0;
}

.section-light {
  background: var(--surface);
}

.section-dark {
  background: var(--dark);
  color: #ffffff;
}

.two-column {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 100px;
}

h2 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.large-text {
  margin-top: 0;
  color: var(--text);
  font-size: 1.3rem;
}

.two-column p:not(.section-label):not(.large-text) {
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  gap: 10px;
  margin-top: 16px;
  color: var(--text);
  font-weight: 750;
}

.text-link span {
  transition: transform 0.2s ease;
}

.text-link:hover span {
  transform: translateX(5px);
}

.text-link-light {
  color: #ffffff;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 55px;
}

.section-heading > p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

.dark-heading > p {
  color: #a8a8b1;
}

/* Skills */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.skill-card {
  min-height: 370px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 50px rgba(20, 20, 30, 0.09);
}

.card-number {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.skill-card h3 {
  margin: 65px 0 14px;
  font-size: 1.55rem;
  line-height: 1.2;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 35px;
}

.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  background: #f0f0eb;
  color: #555555;
  font-size: 0.78rem;
  font-weight: 650;
}

/* Projects */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: var(--dark-light);
}

.project-image {
  min-height: 330px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.project-image::before,
.project-image::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.project-image::before {
  width: 260px;
  height: 260px;
  top: -70px;
  right: -60px;
  background: rgba(255, 255, 255, 0.18);
}

.project-image::after {
  width: 190px;
  height: 190px;
  bottom: -70px;
  left: -40px;
  background: rgba(255, 255, 255, 0.12);
}

.project-image-one {
  background:
    linear-gradient(135deg, #7657ff, #aa91ff);
}

.project-image-two {
  background:
    linear-gradient(135deg, #0f8b8d, #4fc5bd);
}

.project-image span {
  position: relative;
  z-index: 1;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.project-content {
  padding: 32px;
}

.project-category {
  margin: 0 0 10px;
  color: #a8a8b1;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-content h3 {
  margin: 0 0 14px;
  font-size: 1.6rem;
}

.project-content > p:not(.project-category) {
  color: #b8b8c0;
}

.project-links {
  display: flex;
  gap: 22px;
  margin-top: 25px;
}

.project-links a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  font-weight: 700;
}

.project-links a:hover {
  color: #c8bbff;
}

/* Articles */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.article-card {
  padding: 32px;
  border-top: 3px solid var(--text);
  background: var(--surface);
}

.article-meta {
  margin: 0 0 38px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.article-card h3 {
  margin: 0 0 18px;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.article-card > p:not(.article-meta) {
  color: var(--muted);
}

.article-link {
  display: inline-block;
  margin-top: 18px;
  font-weight: 750;
}

.article-link:hover {
  color: var(--accent);
}

/* Contact */

.contact-cta {
  padding: 90px 0;
  background: var(--accent);
  color: #ffffff;
}

.contact-cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 50px;
}

.contact-cta .section-label {
  color: rgba(255, 255, 255, 0.72);
}

.contact-cta h2 {
  max-width: 850px;
}

/* Footer */

.site-footer {
  padding: 80px 0 28px;
  background: #101013;
  color: #ffffff;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 80px;
  padding-bottom: 65px;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p {
  max-width: 400px;
  color: #9999a2;
}

.footer-column h3 {
  margin: 0 0 20px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column li + li {
  margin-top: 10px;
}

.footer-column a {
  color: #aaaab2;
}

.footer-column a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #85858d;
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
}

/* Responsive Overrides */

@media (max-width: 980px) {
  /* Mobile Sandwich Menu Navigation Layout */
  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1002;
  }

  .main-navigation {
    position: absolute; /* Absolute αντί για Fixed, για να λυθεί το bug εμφάνισης στον Chrome */
    top: 100%;          /* Ευθυγράμμιση ακριβώς κάτω από το site-header */
    left: 0;
    right: 0;
    height: 100vh;      /* Διασφαλίζει ότι το μενού θα καλύπτει όλο το viewport */
    z-index: 1001;
    padding: 25px 20px 35px;
    background: #f7f7f3;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease,
      visibility 0.3s ease;
  }

  .main-navigation.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .main-navigation ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .main-navigation li {
    display: block;
    width: 100%;
  }

  .main-navigation a {
    display: block;
    width: 100%;
    padding: 14px 12px;
    color: #171717;
    font-size: 17px;
    position: static;
    transform: translateZ(0);
  }

  /* Reset desktop text hover slide animation in mobile menu links */
  .main-navigation a:not(.nav-button)::after {
    display: none;
  }

  .main-navigation .nav-button {
    margin-top: 8px;
    background: #171717;
    color: #ffffff !important;
    text-align: center;
  }

  /* Menu toggler burger animation */
  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Page structural items layout scale */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 75px;
  }

  .hero-content {
    max-width: 760px;
  }

  .hero-visual {
    width: min(100%, 650px);
    margin-inline: auto;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .cards-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: 310px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .hero {
    padding: 78px 0 90px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.6rem);
  }

  .hero-text {
    font-size: 1.05rem;
  }

  .section {
    padding: 80px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 40px;
  }

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

  .project-image {
    min-height: 260px;
  }

  .contact-cta {
    padding: 75px 0;
  }

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

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 45px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .floating-badge {
    width: 60px;
    height: 60px;
    border-radius: 17px;
  }

  .badge-one {
    right: -7px;
  }

  .badge-two {
    left: -5px;
  }

  .code-content {
    min-height: 350px;
    padding: 38px 22px;
    overflow-x: auto;
  }
}

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

  .button {
    width: 100%;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }
}