
:root {
  /* Culori */
  --bg: #FFFDF7;
  --bg-alt: #FFF6E9;
  --ink: #1A1523;
  --ink-soft: #4A4358;
  --violet: #6C5CE7;
  --violet-dark: #5643D9;
  --pink: #FF6B9D;
  --mint: #00D9A3;
  --yellow: #FFC857;
  --border: #1A1523;

  /* Tipografie */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spațiere */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;

  /* Altele */
  --radius: 16px;
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-hard-sm: 3px 3px 0 var(--ink);
}

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

html { scroll-behavior: smooth; }

@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;
  }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

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

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================
   UTILITARE / LAYOUT
   ============================================ */
.wrap {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: var(--space-md);
}

@media (max-width: 640px) {
  .wrap { padding-inline: var(--space-sm); }
}

.section { padding-block: var(--space-xl); }
@media (max-width: 640px) { .section { padding-block: var(--space-lg); } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--violet);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: var(--space-sm);
}
.eyebrow::before { content: '//'; color: var(--pink); font-weight: 700; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: var(--space-md);
}

.section-intro { max-width: 640px; margin-bottom: var(--space-lg); }
.section-intro p { color: var(--ink-soft); font-size: 1.05rem; margin-top: var(--space-xs); }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 247, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--border);
}

.navbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.logo .dot { color: var(--mint); }
.logo .bracket { color: var(--pink); }

.nav-links {
  display: flex;
  gap: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
  padding-block: 0.2em;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 3px;
  background: var(--violet);
  transition: width 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--violet); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--border);
  border-radius: 8px;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: '';
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 68px; right: 0;
    background: var(--bg);
    flex-direction: column;
    width: min(70vw, 280px);
    height: calc(100vh - 68px);
    padding: var(--space-md);
    border-left: 2px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    gap: var(--space-md);
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; }
}

/* ============================================
   BUTOANE
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.85em 1.5em;
  border-radius: 10px;
  border: 2px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--violet);
  color: white;
  box-shadow: var(--shadow-hard);
}
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.btn-primary:active { transform: translate(0, 0); box-shadow: 2px 2px 0 var(--ink); }

.btn-ghost {
  background: transparent;
  box-shadow: var(--shadow-hard-sm);
}
.btn-ghost:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); background: var(--yellow); }
.btn-ghost:active { transform: translate(0, 0); box-shadow: 2px 2px 0 var(--ink); }

/* ============================================
   HERO
   ============================================ */
.hero {
  padding-block: var(--space-xl) var(--space-lg);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-block: var(--space-lg); }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin-bottom: var(--space-sm);
}
.hero h1 .highlight {
  color: var(--violet);
  position: relative;
  white-space: nowrap;
}
.hero h1 .highlight::after {
  content: '';
  position: absolute;
  left: -4px; right: -4px; bottom: 2px;
  height: 0.35em;
  background: var(--yellow);
  z-index: -1;
  transform: skewX(-6deg);
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: var(--space-md);
}

.hero-cta { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-md); }

.hero-badges {
  display: flex;
  gap: 0.6em;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  padding: 0.4em 0.9em;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: white;
  transform: rotate(-2deg);
}
.badge:nth-child(2) { transform: rotate(1.5deg); background: var(--mint); }
.badge:nth-child(3) { transform: rotate(-1deg); background: var(--yellow); }
.badge:nth-child(4) { transform: rotate(2deg); background: var(--pink); color: white; }

/* --- Terminal window (semnătura vizuală) --- */
.terminal {
  background: var(--ink);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  font-family: var(--font-mono);
  transform: rotate(1.2deg);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.8em 1em;
  background: #2A2438;
  border-bottom: 1px solid #3A3348;
}
.terminal-bar .tdot { width: 11px; height: 11px; border-radius: 50%; }
.terminal-bar .tdot:nth-child(1) { background: #FF6B6B; }
.terminal-bar .tdot:nth-child(2) { background: #FFC857; }
.terminal-bar .tdot:nth-child(3) { background: #00D9A3; }
.terminal-bar .tfile { margin-left: 0.6em; color: #9088A3; font-size: 0.8rem; }

.terminal-body {
  padding: 1.4em 1.3em;
  font-size: 0.9rem;
  color: #E8E4F0;
  min-height: 220px;
}
.terminal-body .ln { color: #6B6480; margin-right: 1em; user-select: none; }
.t-key { color: #FF6B9D; }
.t-fn { color: #00D9A3; }
.t-str { color: #FFC857; }
.t-var { color: #A29BFE; }
.t-com { color: #6B6480; }
.t-punc { color: #E8E4F0; }

.caret {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--mint);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================
   CARDURI PROIECTE
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.project-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--ink); }

.project-thumb {
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  color: white;
  position: relative;
  overflow: hidden;
}
.project-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20px 20px, rgba(255,255,255,0.25) 2px, transparent 2px);
  background-size: 22px 22px;
}
.thumb-1 { background: var(--violet); }
.thumb-2 { background: var(--pink); }
.thumb-3 { background: var(--mint); }

.project-body { padding: var(--space-sm) var(--space-sm) var(--space-md); flex: 1; display: flex; flex-direction: column; }
.project-body h3 { font-size: 1.25rem; margin-bottom: 0.4em; }
.project-body p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }

.tag-row { display: flex; gap: 0.5em; flex-wrap: wrap; margin: 0.9em 0; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25em 0.7em;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
}

.project-links { display: flex; gap: 0.8em; font-family: var(--font-mono); font-size: 0.85rem; }
.project-links a { text-decoration: underline; text-decoration-color: var(--violet); text-underline-offset: 3px; }
.project-links a:hover { color: var(--violet); }

.status-note {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  border: 2px dashed var(--ink-soft);
  border-radius: 10px;
  padding: 1em 1.2em;
  margin-top: var(--space-lg);
}

/* ============================================
   SKILLS
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-sm);
}

.skill-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-sm);
  box-shadow: var(--shadow-hard-sm);
}
.skill-card h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.6em;
}
.skill-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.skill-card:nth-child(1) .skill-dot { background: var(--violet); }
.skill-card:nth-child(2) .skill-dot { background: var(--pink); }
.skill-card:nth-child(3) .skill-dot { background: var(--mint); }

.skill-bar-track {
  height: 8px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5em;
}
.skill-bar-fill { height: 100%; background: var(--violet); }
.skill-card:nth-child(2) .skill-bar-fill { background: var(--pink); }
.skill-card:nth-child(3) .skill-bar-fill { background: var(--mint); }

.skill-card p { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.7em; }

/* ============================================
   PROCESS / ABOUT
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-lg);
  align-items: start;
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }

.avatar-block {
  aspect-ratio: 1;
  background: var(--violet);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 5rem;
  color: white;
  transform: rotate(-1.5deg);
}

.timeline { border-left: 3px solid var(--border); padding-left: var(--space-md); display: flex; flex-direction: column; gap: var(--space-md); }
.timeline-item { position: relative; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-md) - 8px);
  top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--mint);
  border: 2px solid var(--border);
}
.timeline-item .t-date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--violet); }
.timeline-item h3 { font-size: 1.1rem; margin: 0.2em 0 0.3em; }
.timeline-item p { color: var(--ink-soft); font-size: 0.95rem; }

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: var(--space-sm); }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 0.4em;
}
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.8em 1em;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: white;
  transition: box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus {
  box-shadow: 4px 4px 0 var(--violet);
  outline: none;
}
.field textarea { resize: vertical; min-height: 130px; }

.field-error {
  color: #E63946;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  margin-top: 0.35em;
  min-height: 1.2em;
}
.field input.invalid, .field textarea.invalid { border-color: #E63946; }

.form-status {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.9em 1.1em;
  border-radius: 10px;
  margin-top: var(--space-sm);
  display: none;
}
.form-status.show { display: block; }
.form-status.success { background: #DFFCEF; border: 2px solid var(--mint); }

.contact-links { display: flex; flex-direction: column; gap: var(--space-sm); }
.contact-link-card {
  display: flex;
  align-items: center;
  gap: 0.9em;
  background: white;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1em 1.2em;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.15s ease;
}
.contact-link-card:hover { transform: translate(-2px, -2px); }
.contact-link-card .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.contact-link-card:nth-child(1) .icon { background: var(--violet); }
.contact-link-card:nth-child(2) .icon { background: var(--pink); }
.contact-link-card:nth-child(3) .icon { background: var(--mint); }
.contact-link-card .label { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); }
.contact-link-card .value { font-weight: 600; }

/* ============================================
   FOOTER
   ============================================ */
footer {
  border-top: 2px solid var(--border);
  padding-block: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1em; }

/* ============================================
   REVEAL ON SCROLL
   ============================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
