:root {
  --primary: #0f766e;
  --accent: #f97316;
  --ink: #16211f;
  --muted: #5c6865;
  --background: #f7f3ea;
  --surface: #fffdf7;
  --dark: #10201d;
  --line: rgba(22, 33, 31, 0.14);
  --shadow: 0 24px 70px rgba(16, 32, 29, 0.14);
  --heading-font: Georgia, "Times New Roman", serif;
  color-scheme: light;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 8%, rgba(15, 118, 110, 0.15), transparent 30rem),
    linear-gradient(135deg, rgba(255, 253, 247, 0.95), rgba(247, 243, 234, 0.95));
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(16, 32, 29, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 29, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 36px));
  margin: 18px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.84);
  box-shadow: 0 12px 40px rgba(16, 32, 29, 0.09);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 800;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.brand-mark > span {
  grid-area: 1 / 1;
}

.brand-mark img + span {
  display: none;
}

.brand strong,
.brand small {
  display: block;
  overflow: hidden;
  max-width: 230px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.desktop-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.desktop-nav a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.desktop-nav a:hover {
  color: var(--ink);
  background: rgba(15, 118, 110, 0.09);
}

.section-shell {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 84px 0 42px;
}

.hero-copy {
  align-self: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--heading-font);
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(2.45rem, 8vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-bio {
  max-width: 710px;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #fff;
  background: var(--dark);
  box-shadow: 0 14px 30px rgba(16, 32, 29, 0.22);
}

.button.ghost {
  border-color: var(--line);
  background: rgba(255, 253, 247, 0.76);
}

.profile-panel {
  align-self: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 253, 247, 0.92)),
    var(--surface);
  box-shadow: var(--shadow);
}

.avatar-wrap {
  display: grid;
  min-height: 0;
  aspect-ratio: 3 / 4;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.16), rgba(249, 115, 22, 0.18)),
    var(--surface);
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.avatar-wrap span {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 2.6rem;
  font-weight: 900;
}

.profile-meta {
  margin-top: 20px;
}

.profile-meta .role {
  margin-bottom: 6px;
  color: var(--accent);
  font-weight: 900;
}

.profile-meta h2 {
  margin-bottom: 6px;
  font-size: 1.75rem;
  line-height: 1.12;
}

.profile-meta p:last-child {
  color: var(--muted);
}

.stat-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-strip div {
  min-height: 118px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.68);
}

.stat-strip strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 2rem;
  line-height: 1;
}

.stat-strip span {
  color: var(--muted);
}

.content-section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading h2,
.contact-section h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.55rem);
  line-height: 1;
}

.text-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.text-stack p {
  margin: 0;
  padding: 22px;
  border-left: 4px solid var(--primary);
  background: rgba(255, 253, 247, 0.66);
  color: var(--muted);
}

.feature-grid,
.project-grid,
.skill-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-card,
.project-card,
.skill-group,
.education-list article,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: 0 14px 36px rgba(16, 32, 29, 0.06);
}

.feature-card {
  min-height: 250px;
  padding: 20px;
}

.card-index {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--accent);
  font-weight: 900;
}

.feature-card h3,
.project-card h3,
.skill-group h3,
.education-list h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.22;
}

.feature-card p,
.project-card p,
.education-list p {
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  padding: 22px;
}

.timeline-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-bottom: 18px;
}

.timeline-heading p,
.timeline-heading strong {
  margin: 0;
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 900;
}

.timeline-heading h3 {
  margin: 4px 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
}

.timeline-heading span {
  color: var(--muted);
}

ul {
  margin: 0;
  padding-left: 1.15rem;
}

li {
  margin: 8px 0;
  color: var(--muted);
}

li::marker {
  color: var(--accent);
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  padding: 22px;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.work-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: 0 14px 36px rgba(16, 32, 29, 0.06);
}

.work-media {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  background: var(--dark);
}

.work-media iframe,
.work-media video,
.work-media img {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.work-video-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  background: #0b1311;
}

.work-video-item {
  min-width: 0;
  margin: 0;
}

.work-video-frame {
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #050908;
}

.work-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-video-frame video.work-video-contain {
  object-fit: contain;
}

.work-video-item figcaption {
  padding: 10px 2px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.work-media-placeholder > span,
.work-empty-icon {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.work-media-placeholder > span::before,
.work-empty-icon::before {
  margin-left: 4px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #fff;
  content: "";
}

.work-content {
  padding: 20px;
}

.work-content h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
  line-height: 1.18;
}

.work-content p {
  color: var(--muted);
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 850;
}

.work-link:hover {
  color: var(--accent);
}

.work-empty {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 150px;
  padding: 28px;
  border: 1px dashed rgba(15, 118, 110, 0.32);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.58);
}

.work-empty-icon {
  border-color: rgba(15, 118, 110, 0.22);
  background: var(--primary);
}

.work-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: var(--heading-font);
  font-size: 1.35rem;
}

.work-empty p {
  margin: 0;
  color: var(--muted);
}

.tag-row,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row {
  margin-bottom: 18px;
}

.tag-row span,
.pill-list span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(15, 118, 110, 0.07);
  font-size: 0.9rem;
  font-weight: 750;
}

.tag-row span,
.pill-list span {
  padding: 6px 10px;
}

.project-role {
  color: var(--accent) !important;
  font-weight: 900;
}

.skill-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-group {
  padding: 20px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  min-width: 0;
  min-height: 116px;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.78);
  box-shadow: 0 14px 36px rgba(16, 32, 29, 0.06);
}

.tool-logo {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tool-color) 30%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--tool-color) 10%, white);
}

.tool-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.tool-logo > span {
  color: var(--tool-color);
  font-size: 0.82rem;
  font-weight: 900;
}

.tool-logo img + span {
  display: none;
}

.tool-card strong {
  overflow-wrap: anywhere;
  font-size: 0.96rem;
  line-height: 1.28;
}

.education-list {
  display: grid;
  gap: 14px;
}

.education-list article {
  padding: 22px;
}

.education-list span {
  color: var(--primary);
  font-weight: 900;
}

.contact-section {
  margin-top: 20px;
  margin-bottom: 72px;
  padding: 48px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.92), rgba(16, 32, 29, 0.96)),
    var(--dark);
}

.contact-section .eyebrow,
.contact-section p {
  color: rgba(255, 255, 255, 0.76);
}

.contact-section p {
  max-width: 720px;
}

.contact-section .button.primary {
  color: var(--dark);
  background: #fff;
}

.contact-section .button.ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  display: block;
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.error-state {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.reveal-item {
  --reveal-y: 28px;
  opacity: 0;
  transform: translate3d(0, var(--reveal-y), 0) scale(0.985);
  transition:
    opacity 580ms ease var(--reveal-delay, 0ms),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal-item.reveal-from-top {
  --reveal-y: -24px;
}

.reveal-item.reveal-from-bottom {
  --reveal-y: 28px;
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    border-radius: 8px;
  }

  .desktop-nav {
    display: none;
  }

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

  .profile-panel {
    max-width: 620px;
  }

  .section-heading,
  .text-stack,
  .feature-grid,
  .project-grid,
  .work-grid,
  .skill-groups {
    grid-template-columns: 1fr;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card {
    min-height: auto;
  }

  .card-index {
    margin-bottom: 18px;
  }
}

@media (max-width: 720px) {
  .section-shell,
  .site-header,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .work-video-gallery {
    grid-template-columns: 1fr;
  }

  .work-video-item {
    width: min(100%, 360px);
    margin-inline: auto;
  }

  .hero {
    padding-top: 56px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .hero-bio {
    font-size: 1rem;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-card {
    min-height: 98px;
    padding: 14px;
  }

  .tool-logo {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .tool-logo img {
    width: 27px;
    height: 27px;
  }

  .timeline-heading {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 52px 0;
  }

  .contact-section {
    padding: 28px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .work-empty {
    grid-template-columns: 1fr;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Tapien-inspired presentation, adapted to the current portfolio system. */
body {
  background: var(--background);
}

.site-header {
  top: 12px;
  width: min(1280px, calc(100% - 28px));
  margin: 12px auto;
  padding: 11px 14px;
  border-color: rgba(22, 33, 31, 0.1);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.94);
  transition:
    padding 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.site-header.is-scrolled {
  padding-block: 8px;
  background: rgba(255, 253, 247, 0.98);
  box-shadow: 0 16px 44px rgba(16, 32, 29, 0.14);
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border: 2px solid rgba(15, 118, 110, 0.18);
}

.desktop-nav {
  gap: 2px;
}

.desktop-nav a {
  position: relative;
  padding: 9px 11px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 700;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: #fff;
  background: var(--primary);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.site-header.nav-open .nav-toggle span:first-child {
  transform: translateY(6px) rotate(45deg);
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  position: relative;
  width: 100%;
  min-height: min(780px, calc(100svh - 116px));
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 48px;
  margin: 0;
  padding: 72px max(18px, calc((100% - 1180px) / 2)) 58px;
  z-index: 1;
  overflow: visible;
  color: #fff;
  background: var(--dark);
  border-top: 5px solid var(--primary);
}

section {
  scroll-margin-top: 104px;
}

.hero-copy {
  position: relative;
  z-index: 4;
}

.hero .eyebrow {
  color: #78d8cb;
}

.hero h1 {
  max-width: none;
  margin-bottom: 24px;
  color: #fff;
  font-size: 5.2rem;
  line-height: 0.96;
  white-space: nowrap;
}

.hero-bio {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.08rem;
}

.hero .button.primary {
  color: var(--dark);
  background: #fff;
  box-shadow: none;
}

.hero .button.ghost {
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
  background: transparent;
}

.profile-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  justify-self: end;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.avatar-wrap {
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: #24312e;
}

.profile-meta {
  position: absolute;
  right: 26px;
  bottom: 24px;
  left: -48px;
  margin: 0;
  padding: 18px 20px;
  border-left: 5px solid var(--accent);
  border-radius: 0 8px 8px 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.profile-meta h2 {
  font-size: 2rem;
}

.profile-meta p:last-child {
  margin-bottom: 0;
}

.scroll-cue {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  transform: translateX(-50%);
}

.scroll-cue span {
  width: 9px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-2px) rotate(45deg);
}

.content-section {
  position: relative;
  z-index: 0;
  width: 100%;
  margin: 0;
  padding: 96px max(18px, calc((100% - 1180px) / 2));
  border-top: 0;
}

.section-heading {
  display: block;
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading h2,
.contact-section h2 {
  font-size: 3.8rem;
  line-height: 1;
}

#about,
#experience,
#tools {
  background: var(--surface);
}

#strengths,
#skills,
#education {
  background: var(--background);
}

.text-stack {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.text-stack p {
  padding: 28px;
  border-left: 0;
  background: transparent;
}

.text-stack p + p {
  border-left: 1px solid var(--line);
}

.feature-grid {
  gap: 18px;
}

.feature-card {
  border: 0;
  border-top: 5px solid var(--primary);
  border-radius: 0 0 8px 8px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(16, 32, 29, 0.08);
}

.feature-card:nth-child(even) {
  border-top-color: var(--accent);
}

.timeline {
  gap: 34px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.timeline-date {
  position: relative;
  display: grid;
  min-height: 92px;
  place-items: center;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  text-align: center;
  font-weight: 900;
}

.timeline-item:nth-child(even) .timeline-date {
  background: var(--accent);
}

.timeline-date::after {
  position: absolute;
  top: 34px;
  right: -12px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 12px solid var(--primary);
  content: "";
}

.timeline-item:nth-child(even) .timeline-date::after {
  border-left-color: var(--accent);
}

.timeline-body {
  min-height: 150px;
  padding: 2px 0 34px 30px;
  border-left: 1px solid var(--line);
}

.timeline-heading {
  margin-bottom: 18px;
}

.timeline-heading h3 {
  margin-top: 0;
}

#projects,
#works {
  color: #fff;
  background: #14201d;
}

#works {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #101916;
}

#projects .section-heading h2,
#works .section-heading h2 {
  color: #fff;
}

#projects .eyebrow,
#works .eyebrow {
  color: #78d8cb;
}

#projects .project-card,
#works .work-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: #1b2925;
  box-shadow: none;
}

#projects .project-card p,
#projects .project-card li,
#works .work-content p {
  color: rgba(255, 255, 255, 0.68);
}

#projects .project-role,
#works .project-role {
  color: #ff9b54 !important;
}

#projects .tag-row span,
#works .tag-row span {
  border-color: rgba(120, 216, 203, 0.28);
  color: #9de3da;
  background: rgba(120, 216, 203, 0.08);
}

#works .work-empty {
  border-color: rgba(120, 216, 203, 0.36);
  background: rgba(255, 255, 255, 0.04);
}

#works .work-empty strong {
  color: #fff;
}

#works .work-empty p {
  color: rgba(255, 255, 255, 0.66);
}

#works .work-link {
  color: #9de3da;
}

#works .work-link:hover {
  color: #ff9b54;
}

#about,
#strengths,
#experience,
#projects,
#works,
#skills,
#tools,
#education {
  isolation: isolate;
  overflow: hidden;
}

#about,
#strengths {
  --section-background-image: url("assets/bg-strengths.jpg");
}

#experience,
#projects {
  --section-background-image: url("assets/bg-projects.jpg");
}

#works {
  --section-background-image: url("assets/bg-projects.jpg");
}

#skills,
#tools,
#education {
  --section-background-image: url("assets/bg-tools.jpg");
}

#about::before,
#strengths::before,
#experience::before,
#projects::before,
#works::before,
#skills::before,
#tools::before,
#education::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
}

#about::after,
#strengths::after,
#experience::after,
#projects::after,
#works::after,
#skills::after,
#tools::after,
#education::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-attachment: fixed;
  background-image: var(--section-background-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  content: "";
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  #about::after,
  #strengths::after,
  #experience::after,
  #projects::after,
  #works::after,
  #skills::after,
  #tools::after,
  #education::after {
    background-attachment: scroll;
  }
}

#about::before,
#strengths::before {
  background: rgba(247, 243, 234, 0.88);
}

#experience::before,
#skills::before,
#education::before,
#tools::before {
  background: rgba(255, 253, 247, 0.88);
}

#projects::before {
  background: rgba(9, 16, 14, 0.84);
}

#works::before {
  background: rgba(7, 13, 11, 0.88);
}

#strengths .feature-card,
#projects .project-card,
#tools .tool-card {
  backdrop-filter: blur(6px);
}

#strengths .feature-card {
  background: rgba(255, 253, 247, 0.9);
}

#projects .project-card {
  background: rgba(27, 41, 37, 0.88);
}

#tools .tool-card {
  border: 1px solid rgba(22, 33, 31, 0.1);
  background: rgba(247, 243, 234, 0.88);
}

.skill-group {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.skill-group h3 {
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary);
}

.skill-group:nth-child(even) h3 {
  border-bottom-color: var(--accent);
}

.tool-card {
  border: 0;
  background: var(--background);
  box-shadow: none;
}

.education-list article {
  border: 0;
  border-left: 6px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: var(--surface);
}

.contact-section {
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 5px solid var(--primary);
  border-radius: 0;
  color: #fff;
  background: var(--dark);
  text-align: left;
}

.contact-heading {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 18px 38px;
  color: #fff;
  text-align: center;
}

.contact-heading .eyebrow,
.contact-heading p {
  color: rgba(255, 255, 255, 0.72);
}

.contact-heading .eyebrow {
  color: #78d8cb;
}

.contact-heading h2 {
  color: #fff;
}

.contact-heading p:last-child {
  max-width: 660px;
  margin: 14px auto 0;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(1180px, 100%);
  margin: 0 auto;
}

.contact-detail {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-height: 190px;
  padding: 38px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  background: #172824;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.contact-detail:nth-child(2) {
  background: #1b302b;
}

.contact-detail:nth-child(3) {
  background: #142521;
}

.contact-detail:hover,
.contact-detail:focus-visible {
  color: #fff;
  background: #244039;
  outline: none;
  transform: translateY(-5px);
}

.contact-detail-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(120, 216, 203, 0.34);
  border-radius: 50%;
  background: rgba(120, 216, 203, 0.08);
  font-size: 0.82rem;
  font-weight: 900;
}

.contact-detail-mark img {
  width: 25px;
  height: 25px;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

.contact-detail-copy strong,
.contact-detail-copy span {
  display: block;
}

.contact-detail-copy strong {
  margin-bottom: 7px;
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-detail-copy span {
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}

.site-footer {
  min-height: 190px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 42px 18px;
  border-top: 0;
  color: rgba(255, 255, 255, 0.62);
  background: #0d1513;
  text-align: center;
}

.site-footer strong {
  color: #fff;
  font-family: var(--heading-font);
  font-size: 2rem;
}

.site-footer .footer-links {
  justify-content: center;
}

.site-footer .footer-social {
  display: grid;
  width: 48px;
  height: 48px;
  min-width: 48px;
  place-items: center;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #fff;
  background: var(--social-color);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.footer-social img,
.footer-social span {
  grid-area: 1 / 1;
}

.footer-social img {
  width: 23px;
  height: 23px;
  filter: brightness(0) invert(1);
}

.footer-social img + span {
  display: none;
}

.footer-social span {
  font-size: 0.9rem;
  font-weight: 900;
}

.site-footer .footer-social:hover,
.site-footer .footer-social:focus-visible {
  color: #fff;
  background: var(--social-color);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--social-color) 42%, transparent);
  outline: none;
  transform: translateY(-4px);
}

@media (max-width: 1180px) {
  .hero h1 {
    font-size: 4.5rem;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .site-header {
    top: 8px;
    width: calc(100% - 20px);
    margin-block: 8px;
  }

  .nav-toggle {
    display: grid;
    align-content: space-between;
    margin-left: auto;
  }

  .desktop-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    width: min(330px, calc(100vw - 20px));
    max-height: min(70vh, 560px);
    padding: 10px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    visibility: hidden;
    background: rgba(255, 253, 247, 0.99);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      opacity 160ms ease,
      transform 160ms ease,
      visibility 160ms ease;
  }

  .site-header.nav-open .desktop-nav {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .desktop-nav a {
    width: 100%;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 50px;
    padding-top: 72px;
    padding-bottom: 82px;
  }

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

  .hero h1 {
    font-size: 4.5rem;
  }

  .profile-panel {
    width: min(100%, 520px);
    max-width: none;
    justify-self: center;
  }

  .content-section {
    padding-block: 78px;
  }

  .text-stack {
    border: 0;
  }

  .text-stack p {
    border-top: 1px solid var(--line);
  }

  .text-stack p + p {
    border-left: 0;
  }

  .timeline-item {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .brand strong {
    max-width: 160px;
  }

  .brand small {
    display: none;
  }

  .hero {
    padding-inline: 16px;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .section-heading h2,
  .contact-section h2 {
    font-size: 2.7rem;
  }

  .content-section {
    padding: 68px 12px;
  }

  .contact-section {
    padding: 0;
  }

  .contact-heading {
    padding: 58px 18px 30px;
  }

  .contact-details {
    grid-template-columns: 1fr;
  }

  .contact-detail {
    min-height: 0;
    padding: 28px 24px;
  }

  .contact-detail + .contact-detail {
    border-top: 1px solid rgba(16, 32, 29, 0.16);
  }

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

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .timeline-date {
    min-height: 64px;
  }

  .timeline-date::after {
    display: none;
  }

  .timeline-body {
    min-height: 0;
    padding: 0 0 28px;
    border-left: 0;
  }
}

@media (max-width: 460px) {
  .hero h1 {
    font-size: 2.65rem;
  }

  .profile-meta {
    position: static;
    margin-top: 12px;
    border-radius: 0 8px 8px 0;
  }

  .scroll-cue {
    display: none;
  }
}

@media (max-width: 360px) {
  .hero h1 {
    font-size: 2.4rem;
  }
}
