/* ---------- Hugo Blox Academic CV Style ---------- */
html {
  scroll-behavior: smooth;
}

:root {
  --bg: #ffffff;
  --bg-section-alt: #f7f7f7;
  --card: #ffffff;
  --accent: #1565c0;
  --accent-light: rgba(21, 101, 192, 0.1);
  --text-main: #2d3748;
  --text-muted: #718096;
  --border-subtle: #e2e8f0;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.08);
  --transition-fast: 150ms ease;
}

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

body {
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

section {
  margin-bottom: 3.5rem;
}

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-main);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark-inner {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-main);
  text-transform: uppercase;
}

.logo-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 0;
  font-size: 0.875rem;
  align-items: stretch;
  height: 100%;
}

.nav-links a {
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--transition-fast), border-bottom-color var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* Language Toggle Button */
.lang-toggle {
  border-radius: var(--radius-md);
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Hero / Profile Widget ---------- */
.hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

/* Left column: avatar + social */
.hero-profile-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--accent-light);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.hero-profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.hero-profile-role {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.hero-profile-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.hero-social-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-md);
  background: var(--bg-section-alt);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
}

.hero-social-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  text-decoration: none;
}

/* Right column: bio text */
.hero-bio-col {
  padding-top: 0.5rem;
}

.hero-pre {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #c6f6d5;
  background: #f0fff4;
  font-size: 0.75rem;
  color: #2f855a;
  margin-bottom: 1rem;
}

.hero-pre-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #48bb78;
}

.hero-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

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

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.tag {
  font-size: 0.78rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Profile card stats (still used in hero aside) */
.hero-card {
  display: none;
}

.hero-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.stat {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-section-alt);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

/* Availability badge */
.hero-availability {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--bg-section-alt);
  border: 1px solid var(--border-subtle);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #48bb78;
  flex-shrink: 0;
}

/* Buttons */
.btn-primary,
.btn-ghost {
  font-size: 0.875rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #0d47a1;
  border-color: #0d47a1;
  text-decoration: none;
  color: #ffffff;
}

.btn-ghost {
  background: var(--bg-section-alt);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: var(--border-subtle);
  color: var(--text-main);
  text-decoration: none;
}

.btn-icon {
  font-size: 1rem;
}

/* ---------- Sections ---------- */
.section-widget {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 2rem 2rem;
  box-shadow: var(--shadow-card);
}

.section-label {
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.section-divider {
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 1.25rem;
}

.section-description {
  font-size: 0.925rem;
  color: var(--text-muted);
  max-width: 40rem;
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

.about-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.75;
}

.about-text p + p {
  margin-top: 0.9rem;
}

/* Biography / Timeline */
.biography-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 1.5rem;
}

.biography-timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--border-subtle);
  border-radius: 1px;
}

.biography-item {
  display: flex;
  gap: 1.25rem;
  padding: 1rem 0 1rem 0.75rem;
  align-items: flex-start;
  position: relative;
}

.biography-item::before {
  content: "";
  position: absolute;
  left: -1.08rem;
  top: 1.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.biography-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  min-width: 6.5rem;
  padding-top: 0.1rem;
}

.biography-content {
  flex: 1;
}

.biography-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.biography-status {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--card);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.project-pill {
  font-size: 0.72rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-light);
  border: 1px solid rgba(21, 101, 192, 0.2);
  align-self: flex-start;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-title {
  font-weight: 700;
  font-size: 0.975rem;
  color: var(--text-main);
  margin-top: 0.1rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.project-meta {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.project-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

.project-footer a {
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.78rem;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.project-footer a:hover {
  background: #0d47a1;
  border-color: #0d47a1;
  text-decoration: none;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}

.contact-card {
  font-size: 0.925rem;
  color: var(--text-main);
  line-height: 1.75;
}

.contact-card p + p {
  margin-top: 0.75rem;
}

.contact-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-section-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.contact-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.contact-links a {
  border-radius: var(--radius-md);
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 500;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

.contact-links a:hover {
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
}

.contact-form {
  background: var(--bg-section-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  font-size: 0.875rem;
}

.form-row {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

input,
textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg);
  padding: 0.55rem 0.8rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}

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

.form-hint {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-section-alt);
  border-top: 1px solid var(--border-subtle);
  margin-top: 4rem;
}

.site-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-profile-col {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
  }
  .hero-social-links {
    justify-content: flex-start;
  }
  .hero-profile-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  .hero-profile-location {
    justify-content: flex-start;
  }
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  main {
    padding: 2rem 1rem 4rem;
  }
  .hero {
    padding-top: 1.5rem;
    gap: 1.5rem;
  }
  .hero-profile-col {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hero-social-links {
    justify-content: center;
  }
  .hero-profile-location {
    justify-content: center;
  }
  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-card-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-widget {
    padding: 1.25rem 1rem;
  }
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .biography-item {
    flex-direction: column;
    gap: 0.25rem;
  }
  .biography-date {
    min-width: auto;
  }
  .biography-item::before {
    top: 0.6rem;
  }
}
