/* =============================================
   MARCOS SEVERO — Personal Website
   style.css
   ============================================= */

/* ---- Custom Properties ---- */
:root {
  --color-bg:         #0f1117;
  --color-bg-alt:     #161b22;
  --color-text:       #e6edf3;
  --color-muted:      #7d8590;
  --color-subtle:     #4d5562;
  --color-border:     #21262d;
  --color-accent:     #58a6ff;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Lora', Georgia, serif;

  --max-width: 860px;
  --nav-height: 64px;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  4.2rem;

  --radius: 4px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
}

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

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

a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.6;
}

ul {
  list-style: none;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

/* ---- Navigation ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.nav-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: default;
}

.nav-brand-sub {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-muted);
}

.nav-brand-tag {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-muted);
}

.nav-links {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.nav-links a {
  font-size: 0.80rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 0 0 18px rgba(255, 255, 255, 0.4);
  opacity: 1;
}

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
}

/* ---- Bio Section ---- */
.bio-grid {
  display: grid;
  grid-template-columns: 147px 1fr;
  gap: var(--space-md);
  align-items: start;
}

.bio-header {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-xs);
}

.bio-photo img,
.bio-video {
  width: 147px;
  height: 147px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--color-border);
}

.bio-photo img {
  filter: grayscale(15%);
}

.bio-video {
  display: block;
}

.bio-content h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-xs);
}

.bio-title {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.bio-block {
  margin-top: var(--space-md);
}

.bio-block h2 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: var(--space-xs);
}

.bio-block p,
.bio-block li {
  font-size: 0.95rem;
  color: var(--color-text);
}

/* ---- Education & Interests two-column grid ---- */
.edu-interests-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md) var(--space-lg);
}

.edu-interests-grid h2 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: var(--space-xs);
}

.icon-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.icon-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.73rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  color: var(--color-text);
}

.icon-cap {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.22em;
  color: var(--color-muted);
}

.icon-check {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.22em;
  color: var(--color-text);
}

@media (max-width: 480px) {
  .edu-interests-grid {
    grid-template-columns: 1fr;
  }
}

.flag-br {
  display: inline;
  vertical-align: middle;
  margin-left: 0.3rem;
}

.bio-pt {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
  margin-top: var(--space-lg);
}

/* ---- Clean list ---- */
.clean-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.clean-list li {
  font-size: 0.95rem;
  padding-left: 1rem;
  position: relative;
}

.clean-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--color-subtle);
}

/* ---- Section headings ---- */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.section-intro {
  font-size: 0.95rem;
  color: var(--color-muted);
  max-width: 620px;
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

#profile .section-intro {
  color: var(--color-text);
  max-width: 100%;
}


#awards .talk-year,
#talks .talk-year,
#media .talk-year,
#supervisions .talk-year {
  color: var(--color-text);
}

#media .talk-year {
  margin-right: 2.5em;
}

#awards .talk-event,
#talks .talk-event,
#media .talk-event {
  color: #a8b3be;
  font-style: italic;
}

.profile-photo-float {
  float: left;
  width: 288px;
  margin: 0 var(--space-lg) var(--space-md) 0;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

#profile::after {
  content: "";
  display: block;
  clear: both;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.50rem 1.13rem;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  font-size: 0.81rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-accent);
  background: transparent;
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.01em;
}

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

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

.btn-white {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--color-text);
  background: transparent;
}

.btn-white:hover {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 0 0 18px rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
  opacity: 1;
}

.bio-cta {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ---- Scholar CTA ---- */
.scholar-cta {
  margin-top: var(--space-md);
}

/* ---- Publications ---- */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-item {
  padding: var(--space-md) 0;
  border-bottom: 1.32px solid var(--color-border);
}

.pub-item:first-child {
  border-top: 1.32px solid var(--color-border);
}

.pub-meta {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.pub-year {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-subtle);
  white-space: nowrap;
}

.pub-meta-right {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.pub-venue {
  font-size: 0.8rem;
  color: var(--color-text);
  font-style: italic;
}

.pub-volume {
  font-size: 0.8rem;
  color: var(--color-subtle);
}

.pub-author-me {
  color: #ffffff;
  font-weight: 600;
}

.pub-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0.3rem;
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.3rem;
}

.pub-note {
  font-size: 0.8rem;
  color: var(--color-text);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.pub-links {
  display: flex;
  gap: var(--space-sm);
}

.pub-audio-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.pub-audio {
  display: block;
  margin-top: 0.6rem;
  width: 100%;
  max-width: 320px;
  height: 32px;
  opacity: 0.85;
}

.pub-link {
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: 0.2rem 0.55rem;
  background: transparent;
  transition: border-color var(--transition), color var(--transition), text-shadow var(--transition), box-shadow var(--transition);
}

.pub-link:hover {
  color: #ffffff;
  border-color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 0 0 18px rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
  opacity: 1;
}

/* ---- Talks ---- */
.talks-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.talk-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
  align-items: baseline;
}

.talk-item:first-child {
  border-top: 1px solid var(--color-border);
}

.talk-year {
  min-width: 44px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-subtle);
}

.talk-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.talk-details strong {
  font-size: 0.95rem;
  font-weight: 500;
}

.talk-event {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---- Publication filters ---- */
.pub-filters-label {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-style: italic;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
}

.pub-filter {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.pub-filter:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.pub-filter.active {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.pub-item.hidden {
  display: none;
}

/* ---- Supervisions ---- */
.supervisions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

#supervisions .talk-details strong {
  font-size: 0.81rem;
}

#supervisions .pub-venue,
#supervisions .pub-note {
  font-size: 0.68rem;
  color: var(--color-muted);
}

.supervisions-degree {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

/* ---- Media ---- */
.media-video-block {
  margin-bottom: 0;
}

.media-video-block + .media-video-block .media-video-title {
  padding-top: 5rem;
}

.media-video-header {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: var(--space-sm);
}

.media-video-title-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}

.media-video-wrap {
  position: relative;
  padding-bottom: 25.31%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  max-width: 45%;
}

.media-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}


.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
}

.media-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.media-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-subtle);
}

.media-card h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
}

.media-card p {
  font-size: 0.875rem;
  color: var(--color-muted);
  flex: 1;
}


/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  background-color: var(--color-bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--color-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-text);
  opacity: 1;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-subtle);
}

/* ---- Fade-in animation ---- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Resources ---- */
.resource-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-left: 5em;
}

.resource-arrow {
  font-size: 152%;
}

.resource-btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.80rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--color-bg);
  background: var(--color-text);
  border-radius: 6px;
  padding: 0.45rem 1rem;
  text-decoration: none;
  transition: opacity var(--transition);
}

.resource-btn:hover {
  opacity: 0.85;
}

/* ---- Responsive ---- */
@media (max-width: 680px) {
  :root {
    --space-xl: 4rem;
  }

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

  .bio-photo {
    display: flex;
    justify-content: center;
  }

  .bio-header {
    flex-direction: column-reverse;
    align-items: center;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md);
    gap: var(--space-sm);
  }

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

  .nav-toggle {
    display: flex;
  }

  .site-header {
    position: sticky;
  }

  .talk-item {
    flex-direction: column;
    gap: 0.25rem;
  }
}
