/* ═══════════════════════════════════════════════════════════════
   samus.dev — CV Site Styles
   ═══════════════════════════════════════════════════════════════ */

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

/* ── Custom Properties (Dark theme — default) ───────────────── */
:root {
  --bg:             #0d1117;
  --bg-surface:     #161b22;
  --bg-card:        #1c2128;
  --border:         #30363d;
  --text:           #e6edf3;
  --text-secondary: #8b949e;
  --accent:         #64ffda;
  --accent-hover:   #4dd9b4;
  --accent-dim:     rgba(100, 255, 218, 0.08);
  --tag-bg:         rgba(100, 255, 218, 0.1);
  --tag-text:       #64ffda;
  --shadow:         0 2px 12px rgba(0, 0, 0, 0.4);

  --max-width:      860px;
  --radius:         10px;
  --radius-sm:      6px;
  --font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono:      'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

/* ── Light theme ────────────────────────────────────────────── */
@media (prefers-color-scheme: light) {
  :root {
    --bg:             #f6f8fa;
    --bg-surface:     #ffffff;
    --bg-card:        #ffffff;
    --border:         #d1d5db;
    --text:           #1f2937;
    --text-secondary: #6b7280;
    --accent:         #0d9488;
    --accent-hover:   #0f766e;
    --accent-dim:     rgba(13, 148, 136, 0.06);
    --tag-bg:         rgba(13, 148, 136, 0.1);
    --tag-text:       #0d9488;
    --shadow:         0 2px 12px rgba(0, 0, 0, 0.08);
  }
}

/* ── Base ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent-hover); }

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

h1, h2, h3 { line-height: 1.3; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Top Bar ────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: light) {
  .topbar {
    background: rgba(255, 255, 255, 0.85);
  }
}

.topbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar__logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ── Language Switcher ──────────────────────────────────────── */
.lang-switcher {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 2px;
  border: 1px solid var(--border);
}

.lang-switcher__item {
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.lang-switcher__item--active {
  background: var(--accent);
  color: var(--bg);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn--accent {
  background: var(--accent);
  color: var(--bg);
}
.btn--accent:hover {
  background: var(--accent-hover);
  color: var(--bg);
  transform: translateY(-1px);
}

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

.btn--sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  padding: 4rem 0 3rem;
}

.hero__photo {
  flex-shrink: 0;
}

.hero__img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}

.hero__placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.hero__name {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.hero__title {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero__about {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 540px;
  margin-bottom: 1.5rem;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
}

/* ── Sections ───────────────────────────────────────────────── */
.section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.section__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section__icon {
  font-size: 1.3rem;
}

/* ── Timeline ───────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  margin-bottom: 2rem;
}
.timeline__item:last-child { margin-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  z-index: 1;
}

.timeline__content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.timeline__period {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-family: var(--font-mono);
}

.timeline__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.timeline__subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.timeline__degree {
  font-size: 0.9rem;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.timeline__body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.timeline__body p { margin-bottom: 0.5rem; }
.timeline__body p:last-child { margin-bottom: 0; }

/* ── Cards Grid ─────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card__img-wrap {
  position: relative;
  cursor: pointer;
}

.card__img-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s;
}
.card__img-wrap:hover .card__img-overlay {
  opacity: 1;
}

.card__body {
  padding: 1.25rem;
}

.card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.card__meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.card__credits {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.card__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.card__text p { margin-bottom: 0.5rem; }
.card__text p:last-child { margin-bottom: 0; }

.card__link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ── Tags ───────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
}

/* ── Skills ─────────────────────────────────────────────────── */
.skills {
  display: grid;
  gap: 1.5rem;
}

.skills__category {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.skills__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Filter Bar ─────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ── Contacts ───────────────────────────────────────────────── */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.contact-item:hover {
  border-color: var(--accent);
}

.contact-item__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.92);
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.lightbox.active {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}
.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ── Utilities ──────────────────────────────────────────────── */
.no-print { }  /* used by print.css */

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem 0 2rem;
    gap: 1.5rem;
  }

  .hero__name {
    font-size: 1.6rem;
  }

  .hero__about {
    text-align: left;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__img,
  .hero__placeholder {
    width: 140px;
    height: 140px;
  }

  .section__title {
    font-size: 1.25rem;
  }

  .topbar__inner {
    padding: 0.6rem 1rem;
  }

  .topbar__logo {
    font-size: 0.85rem;
  }

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

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