/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0B1120;
  --bg-card: rgba(15, 23, 42, 0.7);
  --text: #E2E8F0;
  --text-muted: #94A3B8;
  --accent: #34D399;
  --accent-soft: rgba(52, 211, 153, 0.15);
  --indigo: #818CF8;
  --indigo-soft: rgba(129, 140, 248, 0.15);
  --amber: #FBBF24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --border: rgba(148, 163, 184, 0.12);
  --content-width: 900px;
  --radius: 16px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Focus vizibil la navigarea cu tastatura ===== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

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

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(11, 17, 32, 0.95);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 24px;
}

.hero-greeting {
  color: var(--accent);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, #A5B4FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #0B1120;
}

.btn-primary:hover {
  background: #6EE7B7;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(52, 211, 153, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-soft);
}

.hero-glow {
  position: absolute;
  top: 20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* ===== Sections common ===== */
section {
  padding: 100px 0;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  font-weight: 700;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ===== About ===== */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  backdrop-filter: blur(8px);
}

.about-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.about-card p:last-child {
  margin-bottom: 0;
}

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

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  align-items: start;
}

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(8px);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.project-card.archived {
  opacity: 0.75;
}

.project-card.archived:hover {
  opacity: 1;
  border-color: rgba(251, 191, 36, 0.3);
}

.project-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.project-badge.live {
  background: var(--accent-soft);
  color: var(--accent);
}

.project-badge.soon {
  background: var(--indigo-soft);
  color: var(--indigo);
}

.project-badge.archive {
  background: var(--amber-soft);
  color: var(--amber);
}

.project-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.feature-list {
  list-style: none;
  margin-bottom: 8px;
}

.feature-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.feature-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--indigo);
  font-weight: 600;
}

.feature-list code {
  background: rgba(129, 140, 248, 0.12);
  color: var(--indigo);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.project-tags span {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border-radius: 6px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: gap var(--transition), color var(--transition);
  gap: 4px;
}

.project-link:hover {
  color: #6EE7B7;
  gap: 8px;
}

/* ===== Contact ===== */
.contact {
  text-align: center;
}

.contact-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition);
}

.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(11, 17, 32, 0.97);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-content {
    padding: 60px 24px;
  }

  .about-card {
    padding: 28px 24px;
  }

  section {
    padding: 70px 0;
  }

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

/* ===== Small animations ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content > * {
  animation: fadeUp 0.7s ease both;
}

.hero-greeting { animation-delay: 0.1s; }
.hero-name { animation-delay: 0.2s; }
.hero-title { animation-delay: 0.3s; }
.hero-subtitle { animation-delay: 0.4s; }
.hero-buttons { animation-delay: 0.5s; }

/* ===== Tehnologii ===== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}

.tech-group h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.tech-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-list li {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 14px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* ===== Formular de contact ===== */
.contact-form {
  display: grid;
  gap: 18px;
  max-width: 520px;
  margin: 0 auto 40px;
  text-align: left;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  /* minimum 16px: sub atat, Safari pe iOS mareste pagina la focus */
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  justify-self: start;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* capcana pentru roboti - ascunsa pentru oameni */
.hp-field {
  position: absolute;
  left: -9999px;
}

.contact-alt {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* ===== Aparitie la derulare ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ===== Respecta setarea de miscare redusa ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Pagina de studiu de caz ===== */
.case-hero {
  padding-top: 140px;
  padding-bottom: 60px;
}

.case-title {
  font-size: clamp(2.2rem, 5.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.case-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 36px;
}

.case-facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  padding: 24px 0;
  margin-bottom: 32px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.case-facts strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.case-facts span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.case-section {
  padding: 56px 0;
}

.case-body p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 680px;
  margin-bottom: 18px;
}

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

.case-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 12px;
}

.case-steps {
  max-width: 680px;
  margin: 0 0 18px 20px;
  color: var(--text-muted);
}

.case-steps li {
  margin-bottom: 12px;
  padding-left: 6px;
}

.case-steps li::marker {
  color: var(--accent);
  font-weight: 700;
}

.case-gaps {
  padding: 18px 20px;
  background: rgba(148, 163, 184, 0.06);
  border-left: 3px solid var(--text-muted);
  border-radius: 0 8px 8px 0;
}

.callout {
  max-width: 680px;
  margin: 28px 0;
  padding: 24px 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.callout h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-warn {
  border-left: 3px solid var(--amber);
}

.callout-warn h3 {
  color: var(--amber);
}

.case-body .tech-grid {
  margin-top: 32px;
  margin-bottom: 32px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.project-link-soft {
  color: var(--text-muted);
}

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

.callout-note {
  border-left: 3px solid var(--indigo);
}

.callout-note h3 {
  color: var(--indigo);
}

/* casetele functioneaza si in afara .case-body, ex. in antet */
.callout p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: none;
  margin-bottom: 14px;
}

/* Navigarea paginii de studiu de caz are un singur link,
   deci nu se pliaza in meniu pe ecrane mici. */
@media (max-width: 768px) {
  .nav-links.nav-simple {
    display: flex;
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
    gap: 0;
  }

  .nav-links.nav-simple a {
    font-size: 0.85rem;
  }
}

/* ===== 404 ===== */
.notfound {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
}

.notfound-code {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.contact-form button {
  min-height: 44px;
}

/* Zone de atingere mai mari pe ecrane tactile.
   24px inaltime e prea putin pentru un deget; ghidul Apple cere 44px. */
@media (max-width: 768px) {
  .nav-links a,
  .project-link {
    padding: 10px 0;
  }

  .logo {
    padding: 6px 0;
  }
}
