@import url('https://fonts.googleapis.com/css2?family=Geist:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #818181;
  --line: rgba(0, 0, 0, 0.165);
  --panel: #f4f2ec;
  --accent: #FF3800;
  --stroke: #d9d9d9;
  --font-family: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size: clamp(16px, 1.5vw, 32px);
  
  --font-weight: 400;
  --font-color: var(--ink);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--font-color);
  font-family: var(--font-family);
  font-size: var(--font-size);
  line-height: 1.45;
  font-weight: var(--font-weight);
  background-color: rgb(243 243 243);
  overflow-x: hidden;
  overflow-y: scroll;
}

a,
button,
p,
h1,
h2,
h3,
li,
span,
dd,
dt,
small {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

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

button {
  border: 0;
  color: inherit;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.site-shell {
  width: 100%;
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(30px, 4vw, 80px);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  border-bottom: 0;
  display: none;
}

.wordmark {
  font-weight: var(--font-weight);
}

.eyebrow,
.cv-period,
.project-year,
.next-kicker,
.client-line,
.back-link,
.service-list,
.project-meta-row dt {
  color: var(--muted);
  font-size: var(--font-size);
  font-family: var(--font-family);
  font-weight: var(--font-weight);
}

main {
  outline: none;
}

.view {
  padding-top: 0px;
}

.cv-view {
  display: grid;
  gap: 20vh;
}

.cv-hero {
  display: grid;
  min-height: clamp(260px, 35vh, 560px);
  align-content: start;
  border-bottom: 0;
  font-size: clamp(36px, 5vw, 72px);
  width: 100%;
  max-width: 900px;
  margin-bottom: 20px; 
}

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

h1,
h2,
h3 {
  margin-bottom: 0;
  font-size: inherit;
  line-height: 1.2;
  text-wrap: pretty;
}

#cv-title {
  display: block;
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--font-color);
  font-size: var(--font-size);
  line-height: 1.2;
}

.cv-section {
  display: grid;
  grid-template-columns: minmax(140px, 20vw) minmax(0, 1fr);
  gap: clamp(16px, 4vw, 54px);
  border-top: 1px solid var(--line);
  padding-top: 1em;
}

.cv-section > h2 {
  margin: 0;
  font-size: var(--font-size);
  line-height: 1.4;
  position: sticky;
  top: 40px;
  align-self: start;
}

.cv-list {
  display: grid;
  gap: 0;
}

.cv-item {
  display: flex;
  flex-direction: column;
  padding: 0 0 0;
  padding-bottom: 1em;
  margin-bottom: 1em;
  border-bottom: 1px solid var(--line);
}

.cv-list .cv-item:last-child {
  border-bottom: none;
}

.cv-item p,
.cv-item li,
.plain-list li {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size);
}

.cv-item ul,
.plain-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 50px);
  margin-bottom: 1em;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}

.cv-section:last-of-type .works-grid {
  grid-template-columns: 1fr;
  gap: 20px;
}

.work-card {
  display: grid;
  gap: 12px;
}

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

.thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 0;
  background: var(--panel);
  border-radius: 8px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.work-card h2 {
  margin: 0;
  font-size: var(--font-size);
}

.back-link {
  display: inline-flex;
  margin-bottom: 24px;
}

.project-top-info {
  margin-bottom: 20vh;
}

#project-title {
  font-size: clamp(32px, 5vw, 64px);
  margin-bottom: 20px;
  line-height: 1.1;
  width: 100%;
  max-width: 900px;
  text-wrap: pretty;
}

.project-subtitle {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: var(--font-size);
  line-height: 1.4;
}

.project-hero {
  display: grid;
  margin-bottom: 40px; 
}

.project-description-box {
  width: 100%;
  

  border-radius: 8px;
 
  justify-content: center;
  padding-top:5em;
  padding-bottom:5em;

}

.project-description-box p {

  text-align: left;
  width:80%;
  font-size: clamp(18px, 2.2vw, 32px);
  line-height: 1.4;
  color: var(--font-color);
text-wrap: balance;
}

.project-gallery {
  display: grid;
  gap: 16px;
  margin-top: 0; 
}

.project-gallery video,
.project-gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 0;
  background: var(--panel);
}

.gallery-main {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  width: 100%;
  max-height: 100%;
}

.gallery-row video,
.gallery-row img {
  min-height: 200px;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 8px;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-meta-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(70px, 0.4fr) minmax(140px, 1.4fr);
  gap: clamp(12px, 3vw, 36px);
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.project-meta-row dt {
  margin-bottom: 0px;
}

.project-meta-row dd {
  margin: 0;
}

.next-project {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  margin-top: clamp(40px, 8vw, 90px);
  border-top: 1px solid var(--line);
  padding: 22px 0;
  text-decoration: none;
}

.next-project span:first-child {
  display: flex;
  flex-direction: column;
}

.next-project strong {
  display: inline-block;
  margin-top: 4px;
  font-size: var(--font-size);
  font-weight: var(--font-weight);
}

.arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  flex-shrink: 0;
}

.site-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(40px, 6vw, 70px);
  border-top: 1px solid var(--line);
  padding: 24px 0 0;
}

.email-copy {
  display: flex;
  flex: 1;
  align-items: flex-end;
  min-height: 100%;
  max-width: 100%;
  padding: 0;
  background: transparent;
  text-align: left;
  justify-content: flex-start;
}

.email-copy span {
  overflow-wrap: anywhere;
  font-weight: var(--font-weight);
  font-size: var(--font-size);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 1em;
  min-width: 140px;
  color: var(--muted);
  font-size: var(--font-size);
}

.social-links a:hover,
.social-links a:focus-visible,
.back-link:hover,
.back-link:focus-visible,
.work-card:hover h2,
.next-project:hover strong {
  color: var(--muted);
}

.bottom-switch {
  position: fixed;
  z-index: 10;
  right: 50%;
  bottom: max(3vh, env(safe-area-inset-bottom));
  transform: translateX(50%) translateY(100px);
  opacity: 0;
  transform-origin: bottom center;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 12px;
  padding: 0.3em;
  background: rgba(255, 255, 255, 0.85);
  gap: 6px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  max-width: var(--initial-width, 145px);
  transition: max-width 350ms cubic-bezier(0.4, 0, 0.2, 1), 
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 600ms ease,
              background-color 200ms ease, 
              box-shadow 200ms ease;
  overflow: hidden;
}

.bottom-switch.is-loaded {
  transform: translateX(50%) translateY(0);
  opacity: 1;
}

.bottom-switch.is-loaded:hover {
  transform: translateX(50%) scale(1.05);
}

.bottom-switch.is-projects {
  max-width: 1000px;
}

.switch-core {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.category-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition: max-width 350ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 250ms ease,
              transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-switch.is-projects .category-bar {
  max-width: 800px;
  opacity: 1;
  padding-left: 12px;
  transform: translateX(0);
  pointer-events: auto;
}

.category-bar button {
  white-space: nowrap;
  flex-shrink: 0;
}

.switch-button,
.category-bar button {
  min-width: auto;
  min-height: 40px;
  border-radius: 4px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: var(--font-size);
  line-height: 1.1;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease, opacity 140ms ease, transform 140ms ease, min-width 180ms ease, padding 180ms ease;
}

.category-bar button {
  padding: 10px 12px;
  border-radius: 100px;
}

.switch-button[aria-selected="true"],
.category-bar button.is-active {
  background-color: var(--accent);
  color: #fff;
}

.category-bar button.is-active {
  border-radius: 100px;
  padding-left: 20px;
  padding-right: 20px;
}

.switch-button.is-active {
  background: var(--ink);
  color: #fff;
}

.switch-button.is-hidden {
  display: none;
}

.switch-button.is-back {
  min-width: 220px;
}

@media (max-width: 920px) {
  .cv-section,
  .project-gallery,
  .skill-columns {
    grid-template-columns: 1fr;
  }

  .cv-section > h2 {
    position: static;
    top: auto;
  }
}

@media (max-width: 680px) {
  :root {
    --font-size: 20px;
  }

  .site-shell {
    padding: 1em;
  }

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

  .site-header,
  .site-footer,
  .next-project {
    align-items: flex-start;
    flex-direction: column;
  }

  .cv-hero {
    font-size: 30px;
    width: 100%;
    min-height: auto;
  }

  #project-title {
    font-size: 28px;
    width: 100%;
  
  }

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

  .works-grid {
    gap: 20px;
  }

  .social-links {
    justify-content: flex-start;
  }

  .bottom-switch {
    right: 12px;
    left: 12px;
    transform: none !important;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    max-width: none !important;
    padding: 6px;
    width: calc(100% - 24px);
  }

  .bottom-switch.is-loaded:hover {
    transform: none !important;
  }

  .switch-core {
    display: flex;
    width: 100%;
    gap: 6px;
  }

  .switch-button {
    flex: 1;
    text-align: center;
    min-height: 42px;
    padding: 8px;
  }

  .category-bar {
    display: none !important;
  }

  .switch-button[data-view="projects"] {
    display: block !important;
  }
}

.bottom-switch.is-hidden {
  display: none !important;
}

.preview-link {
  position: relative;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
}

.fade-in-section {
  animation: fadeInPage 0.6s ease forwards;
}

@keyframes fadeInPage {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background-color: var(--font-color);
  margin-left: 4px;
  vertical-align: -0.15em;
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}