/* ---------------------------------------------------------
   Portfolio — editorial variant
   Same structure/content as the base template, different
   visual language: emerald/ink palette, serif display type,
   squared cards instead of pill/circle shapes.
   Palette / spacing tokens live in :root so the whole theme
   can be restyled by editing this block alone.
---------------------------------------------------------- */

:root {
  --brand: #002f5f;
  --brand-strong: #00224a;
  --brand-soft: #e3eaf3;
  --brand-softer: #f2f5f9;
  --ink: #1a2430;
  --ink-muted: #5c6b7a;
  --border: #dde4ee;
  --surface: #f6f8fb;
  --bg: #ffffff;
  --page-max: 68rem;
  --page-pad: 1.25rem;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(0, 47, 95, 0.08), 0 10px 24px rgba(0, 47, 95, 0.1);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Work Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--page-max);
  padding-inline: var(--page-pad);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: .75rem 1rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 254, 251, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
  padding-block: .7rem;
}
.brand {
  font-family: var(--font-display);
  color: var(--brand-strong);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -.01em;
}
.site-nav ul { display: flex; gap: 1.15rem; font-size: .92rem; }
.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-block: .15rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* Language switcher */
.lang-switch {
  display: flex;
  gap: .3rem;
  padding: .2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.lang-btn {
  font-family: var(--font-sans);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: .3rem .7rem;
  cursor: pointer;
  transition: background-color .18s, color .18s;
}
.lang-btn:hover { color: var(--brand-strong); }
.lang-btn.is-active {
  background: var(--brand-strong);
  color: #fff;
}

@media (min-width: 40rem) {
  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-block: .9rem;
    gap: 1rem;
  }
  .brand { font-size: 1.2rem; }
  .site-nav { margin-left: auto; margin-right: 1.25rem; }
}

/* Hero */
.hero {
  background: var(--brand-strong);
  color: #fff;
  padding-block: 2.75rem 3rem;
  border-bottom: 4px solid var(--brand);
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}
.photo-frame {
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 22px;
  background: var(--brand-soft);
  border: 3px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-text { display: flex; flex-direction: column; gap: .4rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  justify-content: center;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 1px;
  display: inline-block;
}
.name {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 7vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.institution { font-size: 1.05rem; color: rgba(255, 255, 255, 0.92); }
.graduation { font-size: .95rem; color: rgba(255, 255, 255, 0.68); font-variant-numeric: tabular-nums; }
.summary { max-width: 44rem; color: rgba(255, 255, 255, 0.88); margin-top: .85rem; }

@media (min-width: 48rem) {
  .hero { padding-block: 4rem 4.5rem; }
  .hero-inner { text-align: left; flex-direction: row; align-items: center; gap: 2.75rem; }
  .eyebrow { justify-content: flex-start; }
  .photo-frame { width: 11rem; height: 11rem; border-radius: 26px; }
}

/* Sections */
.section { padding-block: 2.75rem; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-title {
  position: relative;
  display: inline-block;
  padding-left: 1.05rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 1.85rem);
  font-weight: 600;
  color: var(--brand-strong);
  letter-spacing: -.01em;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 6px;
  height: .95em;
  background: var(--brand);
  border-radius: 1px;
}
.section-lead { max-width: 42rem; color: var(--ink-muted); margin-top: .9rem; }
.sub-title {
  font-family: var(--font-display);
  color: var(--brand-strong);
  font-weight: 600;
  font-size: 1.15rem;
  margin-top: 2.25rem;
}

@media (min-width: 48rem) {
  .section { padding-block: 4rem; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-top: 1.5rem; }
.contact-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  width: 100%;
  padding: .9rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
a.contact-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.contact-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-radius: 4px;
  flex-shrink: 0;
}
.contact-text { display: flex; flex-direction: column; min-width: 0; }
.contact-label { text-transform: uppercase; letter-spacing: .08em; font-size: .76rem; color: var(--ink-muted); }
.contact-value { font-weight: 600; color: var(--brand-strong); overflow-wrap: anywhere; }

@media (min-width: 40rem) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Projects */
.project-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.75rem; }
.project-grid > .project-card { height: 100%; }
.project-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.35rem 1.25rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.project-period {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .76rem;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.project-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.32;
  color: var(--brand-strong);
}
.project-subtitle { color: var(--ink-muted); }
.project-desc { color: var(--ink); }
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.tag {
  background: transparent;
  color: var(--brand-strong);
  border: 1px solid var(--brand);
  border-radius: 4px;
  padding: .2rem .55rem;
  font-size: .76rem;
  font-weight: 600;
}
.project-link-row { margin-top: auto; padding-top: .9rem; }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem .9rem;
  background: var(--brand-strong);
  border: 1px solid var(--brand-strong);
  color: #fff;
  border-radius: 4px;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .18s;
}
.project-link:hover { background: var(--brand); }

/* Education */
.education-list { display: grid; gap: 1rem; margin-top: 1.75rem; }
.education-item {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.25rem;
  background: var(--brand-softer);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
}
.education-degree { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--brand-strong); }

/* Languages */
.language-list { display: grid; grid-template-columns: 1fr; gap: .6rem; margin-top: 1rem; }
.language-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}
.language-name { font-weight: 600; }
.language-level { color: var(--ink-muted); font-size: .9rem; text-align: right; }

@media (min-width: 40rem) {
  .language-list { grid-template-columns: repeat(3, 1fr); }
}

/* Footer */
.site-footer {
  background: var(--brand-strong);
  color: rgba(255, 255, 255, 0.78);
  padding-block: 1.5rem;
  font-size: .88rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .25rem;
}
@media (min-width: 40rem) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}
