/* ==========================================================================
   Portfolio — design system recreated from the Figma file
   "Personal Portfolio, Blog & CV Website"
   ========================================================================== */

:root {
  /* Core palette sampled from the design */
  --ink: #1f4e63;          /* dark teal — headings, nav, card bg text */
  --ink-deep: #17435a;     /* stacked display words, darkest teal */
  --body: #4a7086;         /* body copy blue-gray */
  --card: #29586d;         /* project card / image placeholder teal */
  --teal: #6ec8c0;         /* accent teal */
  --teal-soft: #cdeae7;    /* pale teal blobs */
  --yellow: #f3c94b;       /* label arrows */
  --purple: #8d7bea;       /* links, dates, active nav */
  --red: #e4595c;
  --lilac: #dccdf6;        /* underline highlight */
  --bg: #ffffff;
  --blob: #f2f2f2;         /* soft gray background shapes */
  --caption-bg: #f0f0f0;

  --font-body: "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo Black", "Arial Black", sans-serif;

  --max: 1060px;
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  overflow-x: hidden;
}

/* Soft gray background blobs, like the design's organic shapes */
.blob {
  position: absolute;
  background: var(--blob);
  border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
  z-index: -1;
}

main { position: relative; }

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Navigation — sticky bar for the one-page layout
   -------------------------------------------------------------------------- */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-bar.scrolled { box-shadow: 0 6px 24px rgba(31, 78, 99, 0.08); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 0 14px;
}

.nav-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  color: var(--ink);
  flex-shrink: 0;
}
.nav-home:hover { text-decoration: none; border-color: var(--purple); color: var(--purple); }
.nav-home svg { width: 16px; height: 16px; }

.site-nav .links {
  display: flex;
  gap: 26px;
  list-style: none;
}

.site-nav .links a {
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-transform: lowercase;
}
.site-nav .links a:hover { color: var(--purple); text-decoration: none; }
.site-nav .links a.active { color: var(--purple); }

.nav-logo {
  margin-left: auto;
  display: inline-flex;
}
.nav-logo svg { width: 36px; height: 36px; }

/* --------------------------------------------------------------------------
   Vertical scroll-cue lines
   -------------------------------------------------------------------------- */
.vline {
  width: 2px;
  background: var(--ink);
  margin: 0 auto;
  border: none;
}
.vline.short { height: 64px; }
.vline.long  { height: 120px; }
.vline.fade  { background: linear-gradient(var(--ink), rgba(31, 78, 99, 0.15)); }

/* --------------------------------------------------------------------------
   Section headings — big display word + tick underneath
   -------------------------------------------------------------------------- */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 54px);
  letter-spacing: 1px;
  color: var(--ink);
  text-align: center;
  text-transform: uppercase;
  line-height: 1;
  margin: 42px 0 0;
}

.section-title + .vline { margin-top: 26px; }

.page-section {
  padding-top: 40px;
  scroll-margin-top: 70px; /* keep anchors clear of the sticky nav */
}

.section-sub {
  text-align: center;
  max-width: 520px;
  margin: 22px auto 0;
  font-size: 15px;
}

.rows.narrow {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.mini-h { color: var(--ink); font-size: 14px; margin-bottom: 6px; }
.chips.gap-b { margin-bottom: 18px; }

.dot-list { list-style: none; }
.dot-list li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
}
.dot-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--purple);
}
.meta.small { font-size: 10.5px; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { text-align: center; padding: 46px 0 0; }

.hero .tagline {
  margin: 0 auto;
  max-width: 780px;
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 27px);
  line-height: 1.75;
}
.hero .tagline .sub {
  display: block;
  font-weight: 400;
  font-size: 0.78em;
}

/* Social icons in the sticky nav */
.nav-social {
  margin-left: auto;
  gap: 10px;
}
.nav-social a {
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.nav-social a:hover {
  color: var(--purple);
  border-color: var(--purple);
  transform: translateY(-2px);
}
.nav-social svg { width: 16px; height: 16px; }

/* Lilac underline highlight, like the Figma tagline */
.hl {
  background-image: linear-gradient(transparent 68%, var(--lilac) 68%);
  padding: 0 2px;
}

/* --------------------------------------------------------------------------
   Work cards — teal cards with white circle badge + right-aligned text
   -------------------------------------------------------------------------- */
.work-grid {
  display: grid;
  gap: 26px;
  margin: 48px 0;
}
.work-grid.cols-2 { grid-template-columns: 1.35fr 1fr; }
.work-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.work-grid.featured { grid-template-columns: 1fr; }

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  min-height: 250px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 15% 110%, rgba(255, 255, 255, 0.06), transparent 60%),
    var(--card);
  color: #fff;
  text-align: right;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.work-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(31, 78, 99, 0.25);
}

.work-card.tall { min-height: 320px; }

.work-card .badge {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.work-card h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  max-width: 320px;
}
.work-card .year { font-size: 13px; opacity: 0.85; }
.work-card .role {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Secondary cards (blog-card style from the design, reused for projects)
   -------------------------------------------------------------------------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 48px 0 20px;
}

.post-card { position: relative; display: block; color: inherit; }
.post-card:hover { text-decoration: none; }

.post-card .thumb {
  position: relative;
  height: 150px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 20% 115%, rgba(255, 255, 255, 0.07), transparent 55%),
    var(--card);
  margin-bottom: 16px;
}
/* pale teal blob peeking from behind the thumb, like the design */
.post-card .thumb::before {
  content: "";
  position: absolute;
  left: -14px;
  bottom: -12px;
  width: 74px;
  height: 58px;
  background: var(--teal-soft);
  border-radius: 55% 45% 40% 60% / 55% 50% 50% 45%;
  z-index: -1;
}

.post-card .body {
  border-right: 2px solid var(--teal);
  padding-right: 14px;
  text-align: right;
}

.post-card h3 {
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.4;
  margin-bottom: 6px;
}
.post-card:hover h3 { color: var(--purple); }

.post-card p { font-size: 13.5px; line-height: 1.55; }

.post-card .date {
  display: block;
  margin-top: 8px;
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--body);
}
.post-card .date::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--purple);
  vertical-align: 1px;
}

/* --------------------------------------------------------------------------
   Project blocks — one-page showcase
   -------------------------------------------------------------------------- */
.project-list {
  max-width: 940px;
  margin: 54px auto 0;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.project {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 38px;
  align-items: start;
}
/* alternate sides, like classic showcase layouts */
.project:nth-child(even) .project-thumb { order: 2; }
.project:nth-child(even) .project-body { order: 1; }

.project-thumb {
  position: relative;
  height: 230px;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 18% 112%, rgba(255, 255, 255, 0.07), transparent 55%),
    var(--card);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.project-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-thumb::before {
  content: "";
  position: absolute;
  left: -16px;
  bottom: -14px;
  width: 86px;
  height: 66px;
  background: var(--teal-soft);
  border-radius: 55% 45% 40% 60% / 55% 50% 50% 45%;
  z-index: -1;
}
.project-thumb .badge {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card);
  font-weight: 700;
  font-size: 12.5px;
}
.project-thumb .thumb-caption {
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  padding-bottom: 12px;
}

.project-body h3 {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.3;
}
.project-body .dates {
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--purple);
  margin: 4px 0 12px;
}
.project-body p { font-size: 14.5px; }
.project-body .chips { margin: 14px 0 4px; }
.project-body .btn-row { margin-top: 14px; }

/* --------------------------------------------------------------------------
   Article / project detail layout
   -------------------------------------------------------------------------- */
.article {
  max-width: 720px;
  margin: 48px auto 0;
}

.meta {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--body);
}
.meta .alt { color: var(--purple); }

.article h1 {
  color: var(--ink);
  font-size: clamp(24px, 3.4vw, 30px);
  line-height: 1.3;
  margin: 10px 0 18px;
}

.article .intro { margin-bottom: 28px; }

.article .lede {
  color: var(--ink);
  font-weight: 700;
  margin: 30px 0 22px;
}

.article p + p { margin-top: 16px; }

.article h2 {
  color: var(--ink);
  font-size: 17px;
  margin: 30px 0 6px;
}

.article ul {
  margin: 14px 0 14px 4px;
  list-style: none;
}
.article ul li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
}
.article ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--purple);
}

.figure { margin: 32px 0; }
.figure .ph {
  height: 340px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 18% 112%, rgba(255, 255, 255, 0.06), transparent 55%),
    var(--card);
}
.figure figcaption {
  background: var(--caption-bg);
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #8a8a8a;
  padding: 7px 0;
  border-radius: 0 0 6px 6px;
}

/* --------------------------------------------------------------------------
   Labelled rows — yellow arrow pattern (About page + project sections)
   -------------------------------------------------------------------------- */
.rows { margin: 56px 0 30px; }

.row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 54px;
  margin-bottom: 52px;
}

.row .label {
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-align: right;
  position: relative;
  padding-right: 64px;
}
/* the long yellow arrow */
.row .label::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 11px;
  width: 44px;
  height: 2px;
  background: var(--yellow);
}
.row .label::before {
  content: "";
  position: absolute;
  right: 4px;
  top: 8px;
  border: 4px solid transparent;
  border-left: 6px solid var(--yellow);
}

.row .content p + p { margin-top: 14px; }

/* Mugshot */
.mugshot {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 1px;
}
.mugshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Social icons */
.social-icons { display: flex; gap: 14px; }
.social-icons a {
  color: var(--ink);
  display: inline-flex;
}
.social-icons a:hover { color: var(--purple); }
.social-icons svg { width: 26px; height: 26px; }

/* Experience entries */
.xp { display: flex; gap: 16px; margin-bottom: 34px; }
.xp:last-child { margin-bottom: 0; }
.xp .logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e9ec;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.xp .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xp .logo.logo-usv img {
  object-fit: contain;
  padding: 4px;
}
.xp h3 { color: var(--ink); font-size: 16px; line-height: 1.35; }
.xp .org {
  font-size: 11.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--body);
  margin-top: 2px;
}
.xp .dates {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #93a9b5;
  margin-bottom: 10px;
}
.xp p + p { margin-top: 12px; }
.xp ul { margin: 12px 0 0; list-style: none; }
.xp ul li { padding-left: 16px; position: relative; margin-bottom: 5px; }
.xp ul li::before { content: "•"; position: absolute; left: 0; color: var(--purple); }

/* --------------------------------------------------------------------------
   Chips + buttons
   -------------------------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  background: #eef4f6;
  border: 1px solid #d5e3e8;
  border-radius: 999px;
  padding: 4px 12px;
}

.btn-row { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14.5px;
  border-radius: 9px;
  padding: 10px 22px;
  transition: transform 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-deep); }
.btn.ghost {
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn.ghost:hover { color: var(--purple); border-color: var(--purple); }
.btn svg { width: 15px; height: 15px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 90px;
  padding: 40px 0 46px;
  text-align: center;
  position: relative;
}
.site-footer .social-icons { justify-content: center; margin-bottom: 16px; }
.site-footer small {
  display: block;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #93a9b5;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .work-grid.cols-2,
  .work-grid.cols-3,
  .post-grid { grid-template-columns: 1fr; }

  .project { grid-template-columns: 1fr; gap: 20px; }
  .project:nth-child(even) .project-thumb { order: 0; }
  .project:nth-child(even) .project-body { order: 0; }

  .row {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 40px;
  }
  .row .label {
    text-align: left;
    padding-right: 0;
    padding-left: 0;
  }
  .row .label::after,
  .row .label::before { display: none; }

  .site-nav { gap: 18px; }
  .site-nav .links { gap: 16px; }
}
