:root {
  --sidebar-bg: #212a39;
  --sidebar-accent: #00c7b2;
  --sidebar-text: #eef3f9;
  --main-bg: #181F2C;
  --projects-bg: #232A3C;
  --about-bg: #273047;
  --contact-bg: #273047;
  --card-bg: #20273B;
  --card-hover: #273047;
  --accent: #00c7b2;
  --accent2: #31a3ed;
  --btn-bg: linear-gradient(90deg, #00c7b2 0%, #31a3ed 100%);
  --btn-hover: linear-gradient(90deg, #31a3ed 0%, #00c7b2 100%);
  --badge1: #00c7b2;
  --badge2: #31a3ed;
  --text-main: #eef3f9;
  --text-muted: #8ea7bf;
  --footer-bg: #181F2C;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Manrope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #212a39;
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.2rem 1rem 1.2rem 1rem;
  box-shadow: 2px 0 24px #181F2C55;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.sidebar-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2.5px solid var(--accent2);
  margin-bottom: 1rem;
  background: #fff;
  object-fit: cover;
}

.sidebar-name {
  font-size: 1.34rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent2);
  margin-bottom: 0.3rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
  align-items: flex-start;
  margin-bottom: auto;
}

.nav-link {
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 700;
  padding: 0.28rem 1rem;
  border-radius: 0.7rem;
  transition: background 0.14s, color 0.14s;
  margin-left: 0.3rem;
  background: none;
  position: relative;
}
.nav-link:hover, .nav-link.active {
  background: var(--accent);
  color: #181F2C;
  font-weight: 800;
}
.sidebar-footer {
  margin-top: 2.2rem;
  font-size: 1.2rem;
}
.sidebar-footer a {
  color: var(--accent);
  transition: color 0.14s;
}
.sidebar-footer a:hover {
  color: #fff;
}

.main-content {
  flex: 1;
  min-width: 0;
  background: none;
  display: flex;
  flex-direction: column;
}
.hero-shell {
  padding: 4rem 0 2.8rem 0;
  background: none;
  color: var(--accent);
  box-shadow: none;
  border-bottom: none;
  position: relative;
  z-index: 2;
}
.hero-shell-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
  padding: 0 2rem;
}
.hero-shell h1 {
  color: var(--accent);
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 24px #31a3ed60;
}
.accent-text {
  color: var(--accent2);
}
.hero-shell h2 {
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 1.3rem;
  color: var(--text-main);
  opacity: 0.87;
  text-shadow: 0 1px 6px #00c7b226;
}
.hero-shell p {
  font-size: 1.11rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
  line-height: 1.5;
  font-weight: 500;
}
.hero-btn {
  background: var(--btn-bg);
  color: #181F2C;
  box-shadow: 0 2px 16px #00c7b255;
  border: none;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.09rem;
  padding: 0.72rem 2.1rem;
  text-decoration: none;
  transition: background 0.22s, color 0.22s, box-shadow 0.18s, transform 0.18s cubic-bezier(.33,1.8,.77,1);
  cursor: pointer;
  display: inline-block;
  width: 220px;
  max-width: 100%;
  text-align: center;
}
.hero-btn:hover,
.hero-btn:focus-visible {
  background: var(--btn-hover);
  color: #fff;
  box-shadow: 0 4px 24px #31a3ed55;
  transform: scale(1.07);
  z-index: 1;
}


.projects-shell {
  padding: 3.2rem 0 2.5rem 0;
  background: none;
  z-index: 2;
  box-sizing: border-box;
  padding-left: 2rem;
  padding-right: 2rem;
}
.projects-shell h2 {
  color: var(--accent);
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2.2rem;
  letter-spacing: 0.01em;
}
.projects-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: stretch;
  z-index: 2;
  box-sizing: border-box;
  padding: 0.5rem 0;
}

.project-card {
  position: relative;
  perspective: 1200px;
  background: none;
  border-radius: 1rem;
  width: 100%;
  height: 370px;
  min-height: 330px;
  max-height: 410px;
  margin-bottom: 0.3rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.project-card-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.75s cubic-bezier(.77,0,.18,1);
  transform-style: preserve-3d;
  position: relative;
  box-sizing: border-box;
  height: 100%;
}

.project-card.flipped .project-card-inner,
.project-card:hover .project-card-inner,
.project-card:focus-within .project-card-inner {
  transform: rotateY(180deg);
}

.project-card-front,
.project-card-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 1rem;
  background: var(--card-bg);
  box-shadow: 0 2px 12px #00c7b219, 0 1px 2px #181F2C10;
  transition: box-shadow 0.18s cubic-bezier(.33,1.8,.77,1), background 0.18s;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0;
}

.project-card-front {
  z-index: 2;
  color: var(--accent2);
  font-size: 1.12rem;
  font-weight: 800;
  text-align: center;
  padding: 1.4rem 1rem 1rem 1rem;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.project-title {
  margin-bottom: 0.7rem;
  font-size: 1.18rem;
  font-weight: 800;
  text-align: center;
}
.project-card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 1.4rem 1rem 1rem 1rem;
}
.btn-group {
  margin-bottom: 0.2rem;
  margin-top: 0.8rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  row-gap: 0.3rem;
  width: 100%;
}

.project-card-back {
  transform: rotateY(180deg);
  z-index: 3;
  color: var(--text-main);
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 1.1rem 1.1rem 1.1rem;
  height: 100%;
  width: 100%;
  display: flex;
  box-sizing: border-box;
}
.project-card-back .back-title {
  color: var(--accent2);
  font-size: 1.13rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.6rem;
}
.project-card-back .back-title {
  color: var(--accent2);
  font-size: 1.13rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.6rem;
}
.project-card-back .desc-center {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
}

.project-card-back .btn-group {
  margin-top: auto;
  margin-bottom: 0.2rem;
}
.project-card:hover .project-card-front,
.project-card.flipped .project-card-front,
.project-card:focus-within .project-card-front,
.project-card:hover .project-card-back,
.project-card.flipped .project-card-back,
.project-card:focus-within .project-card-back {
  box-shadow: 0 6px 22px #31a3ed36, 0 1px 4px #00c7b21a;
  background: var(--card-hover);
}

.tags {
  margin: 0.5rem 0 0.7rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.badge {
  background: var(--badge1);
  color: #20273B;
  font-size: 0.78rem;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  margin: 0.13rem 0.09rem 0.13rem 0;
  font-weight: 700;
  display: inline-block;
}
.badge:nth-child(2) { background: var(--badge2);}
.btn-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
  margin-bottom: 0.6rem;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}
.btn,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  padding: 0.6rem 0;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 0.7rem;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.18s cubic-bezier(.33,1.8,.77,1),
    box-shadow 0.18s,
    background 0.22s,
    color 0.22s;
  cursor: pointer;
  box-sizing: border-box;
  background: none;
  border: none;
}
.btn:hover,
.button:hover,
.btn:focus-visible,
.button:focus-visible {
  transform: scale(1.07);
  box-shadow: 0 4px 24px #31a3ed26;
  z-index: 2;
}
.btn-primary {
  background: var(--btn-bg);
  color: #20273B;
  border: none;
}
.btn-primary:hover {
  background: var(--btn-hover);
  color: #fff;
}
.btn-outline-secondary {
  border: 1.2px solid #31a3ed20;
  color: var(--text-muted);
  background: transparent;
}
.btn-outline-secondary:hover {
  background: #283247;
  color: #fff;
}

/* About & Contact */
.about-shell,
.contact-shell {
  max-width: 700px;
  margin: 3rem auto 2.5rem auto;
  padding: 2.5rem 1.2rem 2.5rem 1.2rem;
  border-radius: 1rem;
  text-align: center;
  background: var(--about-bg);
  box-shadow: none;
  border: none;
}

.about-shell h2, .contact-shell h2 {
  color: var(--accent);
}
.about-shell p, .contact-shell p {
  color: var(--text-muted);
  font-size: 1.07rem;
  font-weight: 500;
  line-height: 1.5;
}
.contact-shell a {
  color: var(--accent2);
  text-decoration: underline;
}
.contact-shell a:hover { color: var(--accent); }

/* Footer */
.footer {
  text-align: center;
  padding: 2.2rem 1rem 1.5rem 1rem;
  background: var(--footer-bg);
  color: #8ea7bf;
  font-size: 1.03rem;
  border-radius: 0 0 1rem 1rem;
  margin-top: 3rem;
  box-shadow: 0 -2px 16px #181F2C33;
}
.footer a {
  color: var(--accent2);
  text-decoration: none;
  margin: 0 0.3em;
  font-weight: 700;
}
.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    flex-direction: row;
    width: 100vw;
    height: auto;
    padding: 1rem 0.5rem;
    position: static;
    box-shadow: none;
    justify-content: center;
    align-items: center;
  }
  .sidebar-header, .sidebar-footer {
    display: none;
  }
  .sidebar-nav {
    flex-direction: row;
    gap: 1.2rem;
    align-items: center;
    margin: 0 auto;
    width: auto;
  }
  .projects-shell {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
}
@media (max-width: 600px) {
  .hero-shell, .about-shell, .contact-shell {
    padding: 1.2rem 0.7rem 1rem 0.7rem;
  }
  .footer {
    font-size: 0.99rem;
    padding: 1.3rem 0.5rem 0.7rem 0.5rem;
  }
}
