/* ---------- tokens ---------- */
:root {
  --bg:        #241C18;
  --surface:   #FDF6EC;
  --ink:       #49342C;
  --body:      #5C4632;
  --muted:     #8A7663;
  --link:      #7A5F45;
  --accent:    #B5654A;
  /* hairline rules — kept faint so they separate without drawing attention */
  --rule:      #EDE1D2;
  --rule-dark: #DFCFB9;

  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Inter', system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;
}

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

body {
  background: var(--bg);
  font-family: var(--sans);
  color: var(--body);
  padding: 3.5rem 2rem;
}

h1, h2, h3 {
  font-family: var(--serif);
}

img {
  max-width: 100%;
}

/* ---------- layout ---------- */
.card {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--surface);
  padding: 3.5rem;
  border-radius: 4px;
  /* wide, soft falloff against the near-black backdrop: the card lifts off
     the page instead of sitting on a visible drop shadow */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.20),
              0 24px 70px rgba(0, 0, 0, 0.45);
}

.content {
  display: flex;
  gap: 3.5rem;
  align-items: flex-start;
}

aside {
  width: 280px;
  flex-shrink: 0;
}

main {
  flex: 1;
  min-width: 0;
}

/* ---------- tab nav ---------- */
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid var(--rule-dark);
  padding-bottom: 1rem;   /* room for the marker to float above the divider */
  margin-bottom: 3rem;
}

nav button {
  position: relative;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--link);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

/* free-floating pill marker: sits between the word and the divider */
nav button::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

nav button:hover {
  color: var(--ink);
}

nav button[aria-selected="true"] {
  color: var(--ink);
}

nav button[aria-selected="true"]::after {
  transform: scaleX(1);
}

/* ---------- sidebar ---------- */
aside img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

aside h1 {
  font-size: 1.6rem;
  line-height: 1.15;              /* collapses Fraunces' half-leading */
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 1;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

.role {
  text-align: center;
  color: var(--accent);
  font-size: 0.9rem;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

.location {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.9rem;
}

.social {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social a {
  color: var(--link);
  display: inline-flex;
  transition: color 0.15s ease;
}

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

/* the single most-requested link — outlined so it reads as an action,
   not as another item in the social row */
.cv {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.7rem 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--link);
  text-decoration: none;
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.cv:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(181, 101, 74, 0.06);
}

/* ---------- panels ---------- */
[role="tabpanel"] {
  outline: none;
}

/* No display:none rule here on purpose. The UA stylesheet already hides
   [hidden] panels, and gives hidden="until-found" content-visibility:hidden
   instead — which is what lets Ctrl+F reach a closed tab. Adding
   display:none back would override that and kill find-in-page. */

/* Removing [hidden] flips the panel out of display:none, which restarts the
   animation — so each tab switch fades its panel in. */
[role="tabpanel"]:not([hidden]) {
  animation: panel-in 0.25s ease both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

main h2 {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

main h2.spaced {
  margin-top: 3.25rem;
}

main p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

main p:last-child {
  margin-bottom: 0;
}

/* ---------- secondary entries (EletroQuad, volunteering) ---------- */
.asides {
  list-style: none;
}

.asides li {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
}

.asides li + li {
  margin-top: 0.75rem;
}

.asides strong {
  font-weight: 500;
  color: var(--body);
}

/* ---------- stack ---------- */
.pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pills li {
  font-family: var(--mono);
  font-size: 0.78rem;
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
}

/* ---------- experience ---------- */
.timeline {
  list-style: none;
}

.timeline > li {
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
}

.timeline > li + li {
  margin-top: 1.5rem;
}

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

.timeline h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--ink);
}

.period {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.company {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.progression {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.bullets {
  list-style: none;
}

.bullets li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 0.6rem;
}

.bullets li:last-child {
  margin-bottom: 0;
}

.bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rule-dark);
}

/* ---------- projects ---------- */
.cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.cards li {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
}

.cards h3 {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.stack {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.75rem !important;
}

.cards p {
  font-size: 0.88rem;
  line-height: 1.6;
}

.cards p:not(.stack) {
  flex: 1;
  margin-bottom: 0;
}

.cards a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 1rem;
  align-self: start;
}

.cards a:hover {
  text-decoration: underline;
}

/* two links on one row, so the live demo sits beside the source */
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-top: 1rem;
}

.card-links a {
  margin-top: 0;
}

/* ---------- contact ---------- */
.contact-list {
  list-style: none;
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
  line-height: 1.6;   /* the availability row runs to two lines */
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-list span:first-child {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  width: 100px;
  flex-shrink: 0;
  align-self: center;
}

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

.contact-list a:hover {
  text-decoration: underline;
}

/* ---------- accessibility ---------- */
a:focus-visible,
nav button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 768px) {
  body {
    padding: 1.25rem 1rem;
  }

  .card {
    padding: 1.75rem;
  }

  .content {
    flex-direction: column;
    gap: 2.5rem;
  }

  aside {
    width: 100%;
  }

  nav ul {
    gap: 1.25rem;
    flex-wrap: wrap;
    row-gap: 1.25rem;   /* the floating marker needs clearance between rows */
  }

  .timeline-head {
    flex-direction: column;
    gap: 0.15rem;
  }

  .contact-list span:first-child {
    width: 100%;
  }
}