/* ABOUTME: Stylesheet for the pantelicu.space personal portfolio site */
/* ABOUTME: Handles the dark/light theme, layout, and section styling for index.html */

:root {
  --bg: #0b0f14;
  --bg-alt: #12181f;
  --bg-raised: #171e26;
  --text: #e6edf3;
  --text-dim: #8b98a5;
  --border: #232c37;
  --accent: #2dd4bf;
  --accent-dim: #1b8f81;
  --accent-2: #f59e0b;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --max-width: 1080px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-alt: #ffffff;
  --bg-raised: #ffffff;
  --text: #161b22;
  --text-dim: #5b6572;
  --border: #e3e6ea;
  --accent: #0d9488;
  --accent-dim: #0f766e;
  --shadow: 0 8px 24px rgba(20, 30, 40, 0.08);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

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

a { color: inherit; }

ul { list-style: none; }

/* progress bar */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 999;
  transition: width 0.1s linear;
}

/* header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 16px;
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

.theme-toggle {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: inline; }

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

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

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: #06201d;
}

.btn-primary:hover { background: var(--accent-dim); color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--accent); }

.gh-mark {
  width: 16px; height: 16px;
  display: inline-block;
  background: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

/* hero */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 72px 24px 56px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -1px;
}

.role {
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 600;
  margin: 8px 0 18px;
}

.bio {
  color: var(--text-dim);
  max-width: 60ch;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.quick-facts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--text-dim);
}

.hero-avatar { display: flex; justify-content: center; }

.avatar-ring {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent));
  display: grid;
  place-items: center;
  padding: 6px;
  animation: spin 14s linear infinite;
}

.avatar-ring span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-alt);
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  animation: spin-reverse 14s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }

/* sections generic */
.section { padding: 64px 24px; }

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-dim);
  margin-bottom: 32px;
  max-width: 65ch;
}

.subsection-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  padding-left: 22px;
  border-left: 2px solid var(--border);
}

.timeline-item { position: relative; }

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.timeline-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.timeline-head h3 { font-size: 1.15rem; }

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}

.timeline-role {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 4px 0 12px;
}

.timeline-card ul { display: flex; flex-direction: column; gap: 8px; }
.timeline-card li {
  padding-left: 18px;
  position: relative;
  color: var(--text-dim);
  font-size: 0.94rem;
}
.timeline-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-card li strong { color: var(--text); }

/* badges */
.badge-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.badge-card {
  display: flex;
  gap: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.badge-medal { font-size: 1.6rem; line-height: 1; }
.badge-card p { color: var(--text-dim); font-size: 0.88rem; margin-top: 4px; }

/* projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.project-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.project-year { color: var(--text-dim); font-weight: 500; font-size: 0.85rem; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}

.project-card ul { display: flex; flex-direction: column; gap: 8px; }
.project-card li {
  padding-left: 18px;
  position: relative;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.project-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* places / map */
.map-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}

.map {
  height: 440px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.place-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.place-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.place-card:hover, .place-card.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-alt));
}

.place-emoji { font-size: 1.4rem; line-height: 1.2; }
.place-name { font-weight: 700; }
.place-label { color: var(--accent); font-size: 0.8rem; font-weight: 600; }
.place-desc { color: var(--text-dim); font-size: 0.85rem; margin-top: 2px; }

.leaflet-popup-content-wrapper {
  background: var(--bg-raised);
  color: var(--text);
  border-radius: 10px;
}
.leaflet-popup-tip { background: var(--bg-raised); }

.pin-icon { background: transparent; border: none; }
.pin-emoji {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px 24px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-name { font-weight: 800; }
.footer-tag { color: var(--text-dim); font-size: 0.88rem; }

.footer-links { display: flex; gap: 20px; }
.footer-links a { text-decoration: none; color: var(--text-dim); font-weight: 600; font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }

.back-to-top {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
}

.footer-copy {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 28px;
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* responsive */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-avatar { order: -1; }
  .avatar-ring { width: 140px; height: 140px; }
  .avatar-ring span { font-size: 2rem; }

  .map-layout { grid-template-columns: 1fr; }
  .map { height: 320px; }

  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: center;
    padding: 18px 0;
    gap: 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
}
