:root {
  --background: #f7f5f0;
  --surface: #ffffff;
  --surface-muted: #ebe7df;
  --text: #22211f;
  --muted: #68635b;
  --accent: #0f6b63;
  --accent-dark: #094740;
  --line: #d9d3c8;
  --header-height: 88px;
  --content-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding: 0 36px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.site-name {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0;
}

.menu-toggle {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--surface-muted);
  color: var(--accent-dark);
  outline: none;
}

.hero-section,
.page-section {
  display: flex;
  align-items: flex-start;
  padding: 34px max(18px, calc((100% - var(--content-width)) / 2));
}

.hero-section {
  align-items: center;
  min-height: calc(100vh - var(--header-height));
  background:
    linear-gradient(135deg, rgba(15, 107, 99, 0.14), transparent 38%),
    var(--background);
}

.page-section {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.alt-section {
  background: var(--surface-muted);
}

.contact-section {
  min-height: auto;
}

.section-inner {
  width: 100%;
  margin: 0 auto;
}

.hero-section .section-inner {
  width: min(920px, 100%);
}

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

h1,
h2 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(3.4rem, 8vw, 6.8rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

p {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.intro-copy {
  max-width: 820px;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.timeline {
  position: relative;
  margin-top: 44px;
  padding: 6px 0 6px 74px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 17px;
  width: 2px;
  background: var(--accent);
  opacity: 0.55;
}

.timeline-item {
  position: relative;
}

.timeline-item + .timeline-item {
  margin-top: 34px;
}

.timeline-node {
  position: absolute;
  top: 18px;
  left: -64px;
  width: 36px;
  height: 36px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface-muted);
  box-shadow: 0 0 0 8px var(--surface-muted);
}

.timeline-node::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 34px;
  width: 30px;
  height: 2px;
  background: var(--accent);
  transform: translateY(-50%);
  opacity: 0.55;
}

.timeline-content {
  width: min(994px, 100%);
  max-width: 994px;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline-content h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.timeline-date,
.timeline-description {
  max-width: none;
  margin-top: 10px;
}

.timeline-date {
  color: var(--accent-dark);
  font-size: 0.94rem;
  font-weight: 700;
}

.timeline-description {
  font-size: 1rem;
}

.education-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
  gap: 42px;
  align-items: start;
  max-width: 1160px;
  margin-top: 34px;
}

.education-main {
  padding-left: 0;
}

.education-main h3 {
  margin: 34px 0 0;
  color: var(--text);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.education-date {
  margin-top: 8px;
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 700;
}

.education-main h4,
.education-grades h4 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.education-main h4 {
  margin-top: 28px;
}

.education-grades {
  padding-top: 0;
}

.activity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 107, 99, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
}

.grades-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.grade-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.grade-item span {
  color: var(--muted);
  font-weight: 700;
}

.grade-item strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  color: var(--accent-dark);
  font-size: 1.1rem;
}

.projects-heading {
  display: flex;
  align-items: end;
}

.project-slider-shell {
  position: relative;
  margin-top: 34px;
  padding: 0 56px;
}

.slider-controls {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.slider-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 112px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 700;
  pointer-events: auto;
  transition: background 180ms ease, color 180ms ease;
}

.slider-button:hover,
.slider-button:focus-visible {
  background: rgba(15, 107, 99, 0.78);
  color: var(--surface);
  outline: none;
}

.slider-button:disabled {
  cursor: default;
}

.project-slider {
  display: grid;
  grid-auto-columns: calc((100% - 44px) / 3);
  grid-auto-flow: column;
  gap: 22px;
  overflow-x: auto;
  padding: 22px 0 28px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.project-slider::-webkit-scrollbar {
  display: none;
}

.project-card {
  display: grid;
  min-height: 260px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(34, 33, 31, 0.08);
  scroll-snap-align: start;
  transform: scale(0.92);
  transform-origin: center;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 20px 44px rgba(15, 107, 99, 0.16);
  outline: none;
  transform: scale(0.95) translateY(-3px);
}

.project-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 28px;
}

.project-card h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.project-card p {
  max-width: none;
  margin-top: 16px;
  font-size: 1rem;
}

.project-card.is-selected {
  border-color: rgba(15, 107, 99, 0.55);
  box-shadow: 0 24px 52px rgba(15, 107, 99, 0.18);
  transform: scale(1);
  z-index: 1;
}

.project-card.is-selected:hover,
.project-card.is-selected:focus-visible {
  transform: scale(1) translateY(-3px);
}

.project-detail-page {
  background: var(--surface);
}

.project-hero-section {
  display: flex;
  align-items: center;
  min-height: calc(78vh - var(--header-height));
  padding: 48px max(18px, calc((100% - var(--content-width)) / 2));
  background:
    linear-gradient(135deg, rgba(15, 107, 99, 0.16), transparent 42%),
    var(--background);
}

.project-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.46fr);
  gap: 42px;
  align-items: center;
}

.project-brief {
  display: grid;
  gap: 14px;
}

.brief-box {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(34, 33, 31, 0.08);
}

.brief-box span,
.process-step span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brief-box strong {
  align-self: end;
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.12;
}

.problem-box {
  background: #17201e;
  border-color: #17201e;
}

.problem-box span {
  color: #8bd7ce;
}

.problem-box strong {
  color: #ffffff;
}

.version-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.version-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(34, 33, 31, 0.08);
}

.version-preview {
  height: 270px;
  background: #101312;
}

.terminal-preview {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 26px;
  color: #f7f5f0;
  font-family: "Courier New", monospace;
  font-size: clamp(0.92rem, 2vw, 1.15rem);
}

.terminal-preview span:nth-child(2) {
  color: #ff6d64;
}

.current-preview {
  background: var(--surface-muted);
}

.current-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.version-copy {
  padding: 24px 24px 18px;
}

.version-copy h3,
.process-step h3,
.changes-list h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.22rem, 2.6vw, 1.65rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.version-copy p,
.process-step p,
.changes-list p {
  max-width: none;
  margin-top: 12px;
  font-size: 1rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 18px;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
  outline: none;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.process-step {
  min-height: 260px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.process-step h3 {
  margin-top: 24px;
}

.changes-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 34px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.changes-list article {
  min-height: 180px;
  padding: 24px;
  background: var(--surface);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1fr);
  gap: 42px;
  align-items: start;
  margin-top: 0;
}

.contact-copy p {
  max-width: 470px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent-dark);
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  background: var(--accent);
  color: var(--surface);
  outline: none;
}

.contact-form {
  display: grid;
  gap: 7px;
  padding: 18px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.botcheck {
  display: none;
}

.contact-form label {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fbfaf7;
  color: var(--text);
  font: inherit;
}

.contact-form textarea {
  min-height: 82px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 107, 99, 0.14);
}

.contact-form button {
  justify-self: start;
  min-height: 36px;
  margin-top: 4px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--surface);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: background 180ms ease;
}

.contact-form button:hover,
.contact-form button:focus-visible {
  background: var(--accent-dark);
  outline: none;
}

@media (max-width: 820px) {
  :root {
    --header-height: 86px;
  }

  .site-header {
    align-items: center;
    flex-wrap: nowrap;
    padding: 18px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    cursor: pointer;
  }

  .menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--accent-dark);
    border-radius: 999px;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

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

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 18px;
    z-index: 20;
    width: min(260px, 100%);
    margin: 0;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(34, 33, 31, 0.08);
  }

  .site-nav.is-open {
    display: grid;
    gap: 6px;
  }

  .site-nav a {
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 12px;
    font-size: 1rem;
  }

  .hero-section,
  .page-section {
    padding: 28px 14px;
  }

  .timeline {
    padding-left: 54px;
  }

  .timeline::before {
    left: 13px;
  }

  .timeline-node {
    left: -50px;
    width: 28px;
    height: 28px;
    box-shadow: 0 0 0 7px var(--surface-muted);
  }

  .timeline-node::after {
    left: 26px;
    width: 24px;
  }

  .timeline-content {
    padding: 20px;
  }

  .education-panel {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .education-main {
    padding-left: 0;
  }

  .projects-heading {
    align-items: flex-start;
  }

  .project-slider {
    grid-auto-columns: calc((100% - 14px) / 2);
    gap: 14px;
  }

  .project-card {
    min-height: 330px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .project-hero-section {
    min-height: auto;
    padding: 34px 14px;
  }

  .project-hero-grid,
  .version-grid,
  .process-grid,
  .changes-list {
    grid-template-columns: 1fr;
  }

  .brief-box {
    min-height: 124px;
  }

  .version-card {
    grid-template-rows: auto auto;
  }

  .process-step,
  .changes-list article {
    min-height: auto;
  }

  .contact-form {
    padding: 20px;
  }
}

@media (max-width: 560px) {
  .project-slider-shell {
    padding: 0 50px;
  }

  .project-slider {
    grid-auto-columns: 100%;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 86px;
  }

  .site-nav {
    width: min(240px, 100%);
  }

  .site-nav a {
    flex: initial;
    justify-content: flex-start;
  }
}
