:root {
  color-scheme: light;
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-strong: #edf5f2;
  --text: #14211f;
  --muted: #5d6f6b;
  --line: #dbe5e1;
  --primary: #0f766e;
  --primary-dark: #0b5d57;
  --accent: #c2410c;
  --shadow: 0 18px 45px rgba(20, 33, 31, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.34);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary-dark);
  transform: translateY(-140%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 6vw;
  border-bottom: 1px solid rgba(219, 229, 225, 0.8);
  background: rgba(247, 249, 248, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 15px;
}

.nav a {
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--primary-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-toggle {
  min-width: 58px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary-dark);
  background: var(--surface);
  cursor: pointer;
  font-weight: 800;
}

.language-toggle:hover {
  border-color: rgba(15, 118, 110, 0.4);
  background: var(--surface-strong);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.section {
  width: min(1120px, 88vw);
  margin: 0 auto;
  padding: 96px 0;
  scroll-margin-top: 88px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.68fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding-top: 58px;
  padding-bottom: 72px;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: normal;
  word-break: normal;
}

.no-break {
  white-space: nowrap;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.04;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-title-line {
  display: block;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.hero-text {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

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

.button.primary:hover {
  background: var(--primary-dark);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
}

.profile-panel {
  --hover-y: 0px;
  display: grid;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 46%),
    var(--surface);
  box-shadow: var(--shadow);
  transform: translateY(var(--hover-y));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.profile-panel:hover {
  --hover-y: -4px;
  box-shadow: 0 24px 58px rgba(20, 33, 31, 0.14);
}

.portrait {
  position: relative;
  overflow: hidden;
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0.02)),
    #ffffff;
  font-size: clamp(72px, 10vw, 126px);
  font-weight: 900;
}

.portrait::after,
.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(14px) saturate(0.82);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.portrait.has-image::after,
.project-visual.has-image::after {
  opacity: 1;
}

.portrait.has-image:hover::after,
.profile-panel:hover .portrait.has-image::after,
.project-card:hover .project-visual.has-image::after {
  opacity: 0;
}

.portrait img,
.project-visual img {
  display: block;
  width: 100%;
  height: 100%;
}

.portrait img {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 16px;
  object-fit: contain;
  object-position: center center;
  background: #ffffff;
  filter: blur(8px) saturate(0.82);
  transform: scale(1.02);
  transition: filter 0.35s ease, transform 0.35s ease;
}

.project-visual img {
  object-fit: cover;
  object-position: center top;
  filter: blur(9px) saturate(0.82);
  transform: scale(1.06);
  transition: filter 0.35s ease, transform 0.35s ease;
}

.portrait.has-image:hover img,
.profile-panel:hover .portrait.has-image img,
.project-card:hover .project-visual.has-image img {
  filter: none;
  transform: scale(1);
}

.portrait span {
  position: relative;
  z-index: 0;
  color: var(--primary);
}

.portrait img.is-missing,
.project-visual img.is-missing {
  display: none;
}

.panel-title {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.profile-quote {
  margin: -8px 0 0;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.4;
  text-align: center;
}

.panel-text {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 800;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}

.quick-stats div {
  padding: 14px 10px;
  border-radius: 8px;
  background: var(--surface-strong);
}

.quick-stats dt {
  color: var(--muted);
  font-size: 12px;
}

.quick-stats dd {
  margin: 2px 0 0;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.35;
}

.split-section {
  display: grid;
  grid-template-columns: 0.42fr 0.58fr;
  gap: 64px;
  border-top: 1px solid var(--line);
}

.rich-text {
  color: var(--muted);
  font-size: 18px;
}

.rich-text p {
  margin: 0 0 18px;
}

.research-snapshot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0 28px;
}

.research-snapshot div {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.06), rgba(15, 118, 110, 0.01)),
    var(--surface);
}

.research-snapshot span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.research-snapshot strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.working-style {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.working-style div {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08), transparent 42%),
    var(--surface);
}

.working-style span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.working-style strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.about-aside {
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.aside-card {
  display: grid;
  gap: 2px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(20, 33, 31, 0.06);
}

.aside-card strong {
  color: var(--primary-dark);
  font-size: 28px;
  line-height: 1;
}

.aside-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.research-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--surface-strong);
  font-size: 13px;
  font-weight: 800;
}

.about-details {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
}

.about-details div {
  padding: 16px;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.66);
}

.about-details dt {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.about-details dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.38;
}

.personal-facets {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(194, 65, 12, 0.08), transparent 54%),
    var(--surface);
}

.personal-facets p {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.personal-facets div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.personal-facets span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 800;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill-block,
.project-card {
  --hover-y: 0px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transform: translateY(var(--hover-y));
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.skill-block:hover,
.project-card:hover {
  --hover-y: -4px;
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 16px 36px rgba(20, 33, 31, 0.09);
}

.skill-block {
  padding: 24px;
}

.skill-block p,
.project-content p,
.timeline p,
.contact-section p {
  margin: 0;
  color: var(--muted);
}

.tag-list,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list {
  margin-top: 24px;
}

.tag-list span,
.project-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--surface-strong);
  font-size: 13px;
  font-weight: 700;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  height: 100%;
}

.project-visual {
  position: relative;
  overflow: hidden;
  height: 180px;
  background-color: var(--surface-strong);
  background-size: cover;
  background-position: center;
}

.visual-a {
  background-image:
    linear-gradient(135deg, rgba(15, 118, 110, 0.82), rgba(20, 33, 31, 0.15)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.26) 0 1px, transparent 1px 34px);
}

.visual-b {
  background-image:
    linear-gradient(135deg, rgba(194, 65, 12, 0.82), rgba(15, 118, 110, 0.18)),
    radial-gradient(circle at 28% 32%, rgba(255, 255, 255, 0.9) 0 7%, transparent 8%),
    radial-gradient(circle at 72% 64%, rgba(255, 255, 255, 0.62) 0 12%, transparent 13%);
}

.visual-c {
  background-image:
    linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(15, 118, 110, 0.22)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 18%, transparent 18% 26%, rgba(255, 255, 255, 0.22) 26% 46%, transparent 46%);
}

.project-content {
  display: grid;
  grid-template-rows: auto auto minmax(132px, 1fr) auto auto;
  gap: 14px;
  padding: 22px;
  height: 100%;
}

.project-type {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.project-card a,
.project-action {
  width: fit-content;
  color: var(--primary-dark);
  font-weight: 800;
}

.project-action {
  min-height: 32px;
  padding: 0;
  border: 0;
  color: var(--primary-dark);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
}

.project-link:hover,
.project-action:hover {
  color: var(--primary);
}

.project-action:focus-visible {
  border-radius: 6px;
}

.timeline {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.time {
  color: var(--primary);
  font-weight: 900;
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  width: min(1120px, 88vw);
  margin-bottom: 72px;
  padding: 48px;
  border-radius: 8px;
  color: #fff;
  background: #14211f;
  overflow: hidden;
  position: relative;
}

.contact-section::after {
  content: "";
  position: absolute;
  inset: auto -80px -160px auto;
  width: 300px;
  height: 300px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.45), rgba(194, 65, 12, 0.24));
  border-radius: 50%;
  opacity: 0.4;
}

.contact-section > * {
  position: relative;
  z-index: 1;
}

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

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

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 6vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--primary-dark);
  font-weight: 800;
}

.video-modal[hidden] {
  display: none;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 33, 31, 0.54);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(20, 33, 31, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.modal-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b1211;
}

.modal-note {
  margin: 0;
  padding: 12px 18px 16px;
  color: var(--muted);
  font-size: 14px;
}

.reveal {
  --hover-y: 0px;
  opacity: 0;
  transform: translate3d(var(--reveal-x, 0px), calc(var(--reveal-y, 0px) + var(--hover-y)), 0);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.reveal-left {
  --reveal-x: -44px;
}

.reveal-right {
  --reveal-x: 44px;
}

.reveal-up {
  --reveal-y: 30px;
}

.reveal.is-visible {
  --reveal-x: 0;
  --reveal-y: 0;
  opacity: 1;
}

@media (max-width: 860px) {
  .site-header {
    min-height: 64px;
  }

  .menu-button {
    display: block;
  }

  .language-toggle {
    height: 42px;
  }

  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 6vw;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 24px 40px rgba(20, 33, 31, 0.12);
  }

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

  .nav a {
    padding: 14px 0;
  }

  .section {
    width: min(100% - 32px, 1120px);
    padding: 68px 0;
    scroll-margin-top: 80px;
  }

  .hero,
  .split-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .research-snapshot {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 34px;
    min-height: auto;
    padding-top: 48px;
  }

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

  .contact-section {
    width: min(100% - 32px, 1120px);
    padding: 30px 22px;
  }

  .contact-actions {
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 44px;
  }

  .hero-text,
  .rich-text {
    font-size: 17px;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .portrait img {
    padding: 10px;
  }

  .button {
    width: 100%;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .portrait img,
  .project-visual img {
    filter: none;
    transform: none;
  }

  .portrait::after,
  .project-visual::after {
    opacity: 0;
  }
}
