/* Minimal professional palette — white base, one warm accent for personality */
:root {
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --ink: #171717;
  --ink-muted: #525252;
  --line: #e5e5e5;
  --accent: #b45309;
  --accent-soft: rgba(180, 83, 9, 0.12);
  --accent-hover: #92400e;
  --radius: 10px;
  --header-h: 72px;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
  scroll-behavior: smooth;
}

@supports (height: 100dvh) {
  html {
    height: 100dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  main,
  .site-footer {
    animation: none;
  }
}

body {
  margin: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

@supports (height: 100dvh) {
  body {
    max-height: 100dvh;
  }
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  border-radius: 6px;
}

.skip-link:focus {
  left: 0.75rem;
}

/* Header */
.site-header {
  position: relative;
  z-index: 40;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}

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

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.social-link span {
  font-family: var(--font-display);
}

.social-link--linkedin {
  background: #0a66c2;
  color: #ffffff;
  border-color: #0a66c2;
}

.social-link--linkedin:hover {
  background: #004182;
  border-color: #004182;
  color: #ffffff;
}

.resume-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}

.resume-link:hover,
.resume-link:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.resume-icon {
  color: var(--accent);
}

.site-nav .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.15rem 1.35rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  background: none;
  border: none;
  box-shadow: none;
}

.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 0.35rem 0;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--ink);
}

.nav-link.is-active {
  color: var(--ink);
  background: none;
  transform: none;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }

  .site-nav.is-open {
    max-height: 320px;
  }

  .site-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.25rem;
    gap: 0;
  }

  .site-nav .nav-link {
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav .nav-link.is-active::after {
    display: none;
  }

  .site-nav .nav-link.is-active {
    padding-left: 0.5rem;
    border-left: 3px solid var(--accent);
    border-bottom-color: var(--line);
  }

  .header-inner {
    justify-content: space-between;
  }
}

/* Page load: subtle fade + slide up (runs on every navigation) */
@keyframes page-content-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main: fills space between header and footer (no page scroll) */
main {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: page-content-in 0.58s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Sections */
.section {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(0.75rem, 2.5vh, 2rem) clamp(1rem, 3vw, 1.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* Case-study detail: allow scroll inside main when content is long */
.section.section-project-detail {
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: clamp(1rem, 3vh, 2rem);
  padding-bottom: clamp(1rem, 3vh, 2rem);
}

.section-header {
  margin-bottom: clamp(0.75rem, 2vh, 1.75rem);
  max-width: 40rem;
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 0.45rem;
}

.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-header--with-action {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  max-width: none;
}

.section-header-text {
  flex: 1 1 min(100%, 32rem);
  min-width: 0;
}

.section-header-action {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.2rem;
}

/* Hero */
.section-hero {
  padding-top: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, min(52vw, 580px));
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: center;
  min-height: 0;
  width: 100%;
}

.hero-photo-wrap {
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  min-width: 0;
  width: 100%;
}

.hero-photo-frame {
  width: 100%;
  max-width: none;
  border-radius: 20px;
  padding: 3px;
  background: linear-gradient(
    145deg,
    var(--accent) 0%,
    #d97706 40%,
    var(--accent) 100%
  );
  box-shadow:
    0 20px 40px -12px rgba(180, 83, 9, 0.3),
    0 0 0 1px rgba(23, 23, 23, 0.06);
}

.hero-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(68vh, 640px);
  border-radius: 17px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  background: var(--bg-subtle);
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.25rem, 3vh, 2rem);
  }

  .hero-photo-wrap {
    max-width: min(100%, 520px);
    margin: 0 auto;
    width: 100%;
  }

  .hero-photo {
    max-height: min(58vh, 520px);
  }
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.section-hero .eyebrow {
  color: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vh + 1.5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 clamp(0.5rem, 1.5vh, 1rem);
}

.hero-lead {
  margin: 0 0 clamp(0.75rem, 2vh, 1.25rem);
  color: var(--ink-muted);
  font-size: clamp(0.9rem, 1.1vh + 0.85rem, 1.05rem);
  max-width: 38rem;
}

@media (min-width: 881px) {
  .hero-copy {
    min-width: 0;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:active {
  transform: scale(0.99);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--bg-subtle);
}

.btn-full {
  width: 100%;
}

/* About */
.section-about {
  border-top: none;
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.section-about .section-header {
  max-width: none;
  width: 100%;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(280px, min(52vw, 420px)) minmax(0, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
  align-items: start;
  min-height: 0;
  overflow: visible;
  width: 100%;
}

.about-photo-card {
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.about-photo-frame {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 18px;
  padding: 3px;
  background: linear-gradient(
    145deg,
    var(--accent) 0%,
    #d97706 40%,
    var(--accent) 100%
  );
  box-shadow:
    0 16px 32px -12px rgba(180, 83, 9, 0.3),
    0 0 0 1px rgba(23, 23, 23, 0.06);
}

.about-photo-frame::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  border: 1px solid var(--line);
  pointer-events: none;
  opacity: 0.85;
}

.about-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(520px, 58vh);
  border-radius: 15px;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  object-position: 62% 42%;
  vertical-align: middle;
  background: var(--bg-subtle);
}

.about-photo-label {
  margin: 0.55rem 0 0;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: center;
}

.about-photo-actions {
  margin-top: 0.55rem;
  display: flex;
  justify-content: center;
}

.resume-link--about {
  width: 100%;
  max-width: 100%;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  font-size: 0.97rem;
  gap: 0.55rem;
  border-radius: 8px;
}

.resume-link--about .resume-icon {
  width: 20px;
  height: 20px;
}

.about-edu {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  gap: 0.35rem;
  width: 100%;
}

.about-edu + .about-edu {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.about-edu-mark {
  width: 100%;
  margin: 0 0 0.2rem;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 12px 28px -10px rgba(19, 41, 75, 0.22),
    0 0 0 1px rgba(23, 23, 23, 0.06);
}

.about-edu-mark--light {
  background: #ffffff;
  box-shadow:
    0 12px 28px -10px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(23, 23, 23, 0.06);
}

/* Illinois banner: full width; navy field matches logo so no white gutters */
.about-photo-card .about-edu:first-of-type .about-edu-mark {
  background: #13294b;
}

.about-uiuc-logo {
  display: block;
  width: 100%;
  height: auto;
}

.about-google-logo {
  display: block;
  width: 100%;
  max-height: 48px;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.about-edu-school,
.about-edu-uni,
.about-edu-degree {
  width: 100%;
  max-width: 20rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  text-wrap: balance;
}

.about-edu-school {
  margin-top: 0;
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.35;
}

.about-edu-uni {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  line-height: 1.4;
}

.about-edu-degree {
  margin-top: 0.15rem;
  margin-bottom: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  line-height: 1.45;
}

.about-main {
  display: flex;
  flex-direction: column;
  gap: clamp(0.85rem, 2vh, 1.35rem);
  min-width: 0;
  width: 100%;
  max-width: none;
}

.section-about .about-text,
.section-about .about-personal {
  width: 100%;
  max-width: none;
}

@media (max-width: 880px) {
  .about-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .about-photo-card {
    max-width: min(400px, 92vw);
    width: 100%;
  }

  .about-main {
    width: 100%;
  }
}

.about-text p {
  margin: 0 0 clamp(0.5rem, 1.2vh, 0.85rem);
  color: var(--ink-muted);
  font-size: clamp(0.9rem, 0.9vh + 0.8rem, 1rem);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-personal {
  margin-top: clamp(0.5rem, 1.2vh, 0.85rem);
}

.about-personal p {
  margin: 0 0 clamp(0.5rem, 1.2vh, 0.85rem);
  color: var(--ink-muted);
  font-size: clamp(0.9rem, 0.9vh + 0.8rem, 1rem);
  line-height: 1.55;
}

.about-personal p:last-child {
  margin-bottom: 0;
}

.about-bottom {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.5vh, 1rem);
  width: 100%;
}

.about-skills,
.about-hobbies {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.05rem;
  box-shadow: 0 1px 0 rgba(23, 23, 23, 0.04);
}

.about-skills-title,
.about-hobbies-title {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
  line-height: 1.2;
}

.skills-tags,
.hobbies-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.45rem;
  align-content: start;
}

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

.skills-tags li,
.hobbies-tags li {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  background: var(--bg-subtle);
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink);
  line-height: 1.4;
  text-align: left;
}

.skills-tags li {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

.hobbies-tags li {
  text-align: center;
  justify-content: center;
  display: flex;
  align-items: center;
}

.about-skills-lang {
  margin: auto 0 0;
  padding-top: 0.85rem;
  margin-top: 0.85rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.about-skills-lang-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
}

.about-skills-lang-value {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* Desktop: skills + hobbies share remaining column height */
@media (min-width: 881px) {
  .section-about .about-layout {
    flex: 1 1 0;
    min-height: 0;
    grid-template-rows: 1fr;
    align-items: start;
  }

  .about-photo-card {
    align-self: start;
  }

  .about-main {
    align-self: stretch;
    height: 100%;
    min-height: 0;
  }

  .section-about .about-text,
  .section-about .about-personal {
    flex-shrink: 0;
  }

  .about-bottom {
    flex: 1 1 0;
    min-height: 6.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .about-skills {
    flex: 1 1 0;
    min-height: 5.5rem;
    height: auto;
    padding: 1.15rem 1.2rem 1.2rem;
    justify-content: flex-start;
  }

  .about-hobbies {
    flex: 1 1 0;
    min-height: 5.5rem;
    height: auto;
    padding: 1.15rem 1.2rem 1.2rem;
    justify-content: center;
  }

  .about-skills-title,
  .about-hobbies-title {
    margin-bottom: 0.8rem;
    padding-bottom: 0.7rem;
  }

  .skills-tags {
    gap: 0.5rem;
  }

  .hobbies-tags {
    gap: 0.5rem;
  }

  .skills-tags li,
  .hobbies-tags li {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Projects */
.section-projects {
  border-top: none;
  justify-content: center;
}

.section-projects .section-header {
  margin-bottom: clamp(0.5rem, 1.5vh, 1.25rem);
}

.project-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.5vh, 1rem);
  min-height: 0;
  align-content: center;
}

@media (max-width: 980px) {
  .project-grid:not(.project-grid--two) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.35rem, 1vh, 0.65rem);
  }
}

@media (max-width: 720px) {
  .project-grid:not(.project-grid--two) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s;
}

.project-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.project-card--link {
  cursor: pointer;
}

.project-thumb {
  height: clamp(72px, 14vh, 120px);
  background: linear-gradient(135deg, #f5f5f4 0%, #e7e5e4 100%);
}

.project-thumb--b {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.project-thumb--c {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.project-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 720px) {
  .project-grid--two {
    grid-template-columns: minmax(0, 1fr);
  }
}

.project-thumb--duolingo {
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
}

.project-thumb--duolingo img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.project-thumb--lincoln {
  background: #1a1528;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.project-thumb--lincoln img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.project-body {
  padding: clamp(0.5rem, 1.2vh, 0.85rem);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1vh + 0.65rem, 1.05rem);
  margin: 0 0 0.2rem;
  line-height: 1.2;
}

.project-meta {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-desc {
  margin: 0;
  font-size: clamp(0.72rem, 0.55vh + 0.65rem, 0.85rem);
  line-height: 1.35;
  color: var(--ink-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Project detail */
.section-project-detail {
  border-top: 1px solid var(--line);
}

.project-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .project-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.project-detail-hero {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-detail-hero .project-thumb {
  height: 200px;
}

.project-detail-hero .project-body {
  padding: 1.35rem 1.35rem 1.45rem;
}

/* Full project summary on detail pages (card grid uses .project-desc with line-clamp) */
.project-detail-hero .project-desc {
  display: block;
  flex: none;
  overflow: visible;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  font-size: clamp(0.9rem, 0.9vh + 0.8rem, 1.02rem);
  line-height: 1.55;
}

.project-detail-overview {
  margin-top: clamp(1.25rem, 3vh, 2rem);
  max-width: 42rem;
}

.project-detail-overview p {
  margin: 0;
  font-size: clamp(0.9rem, 0.9vh + 0.8rem, 1.02rem);
  line-height: 1.55;
  color: var(--ink-muted);
}

.project-detail-copy p {
  margin: 0 0 1.1rem;
  color: var(--ink-muted);
}

.project-detail-copy p:last-child {
  margin-bottom: 0;
}

.project-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-detail-list li {
  border: 1px solid var(--line);
  background: var(--bg-subtle);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.project-detail-split {
  margin-top: clamp(1.25rem, 3vh, 2rem);
}

.project-detail-subhead {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.project-detail-back {
  margin-top: clamp(1.25rem, 2.5vh, 2rem);
}

.project-portfolio {
  margin-top: clamp(1.5rem, 3vh, 2.25rem);
}

.project-portfolio-intro {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
  max-width: 42rem;
  line-height: 1.5;
}

.project-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 900px) {
  .project-portfolio-item--wide {
    grid-column: span 2;
  }
}

.project-portfolio-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-subtle);
}

.project-portfolio-item img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.project-portfolio-item figcaption {
  padding: 0.65rem 0.9rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* Contact */
.section-contact {
  border-top: none;
  justify-content: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vh, 1.75rem);
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 840px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.contact-intro--solo {
  max-width: 32rem;
}

.contact-intro p {
  margin: 0 0 1.1rem;
  color: var(--ink-muted);
}

.contact-intro p.contact-intro-lead {
  color: var(--accent);
}

.contact-direct {
  margin: 0;
  padding-top: 0.35rem;
}

.contact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.3rem;
}

.contact-location {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}

.contact-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  margin-top: 0.15rem;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

.contact-action-btn .contact-action-icon,
.contact-action-btn > span {
  pointer-events: none;
}

.contact-action-btn:hover,
.contact-action-btn:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.contact-action-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-action-icon {
  flex-shrink: 0;
  color: var(--accent);
}

.contact-linkedin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.15rem;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  border: 1px solid #0a66c2;
  background: #0a66c2;
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.contact-linkedin-btn:hover,
.contact-linkedin-btn:focus-visible {
  background: #004182;
  border-color: #004182;
  color: #ffffff;
}

.contact-linkedin-btn:focus-visible {
  outline: 2px solid #0a66c2;
  outline-offset: 2px;
}

.contact-linkedin-icon {
  flex-shrink: 0;
}

.contact-intro--solo .contact-direct + .contact-direct {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.contact-feedback {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.contact-form {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(0.85rem, 2vh, 1.25rem);
}

.field {
  margin-bottom: clamp(0.45rem, 1.2vh, 0.75rem);
}

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent-soft);
  outline-offset: 0;
  border-color: var(--accent);
}

.field textarea {
  resize: none;
  min-height: clamp(56px, 12vh, 100px);
  max-height: 22vh;
}

.form-hint {
  margin: 0.65rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  min-height: 1.2rem;
}

.form-hint.is-error {
  color: #b91c1c;
}

.form-hint.is-success {
  color: #15803d;
}

/* Footer */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 0.65rem 1rem;
  text-align: center;
  background: var(--bg);
  animation: page-content-in 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.07s both;
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}
