:root {
  --bg: #ccb999;
  --panel: #f0e8da;
  --text: #1e110a;
  --muted: #5a3a28;
  --accent: #000f08;
  --accent-strong: #5e1803;
  --line: rgba(120, 129, 118, 0.35);
  --shadow: 0 8px 32px rgba(30, 17, 10, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Manrope", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.page-glow {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.3rem clamp(1rem, 3vw, 2.8rem);
  backdrop-filter: blur(10px);
  background: rgba(204, 185, 153, 0.9);
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.brand {
  color: var(--accent-strong);
  text-decoration: none;
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 0.7rem;
}

.site-nav a {
  color: var(--accent-strong);
  text-decoration: none;
  border: 1px solid transparent;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--accent-strong);
  background: rgba(94, 24, 3, 0.08);
}

.section {
  width: min(1140px, 92vw);
  margin: 0 auto;
  padding: clamp(2.4rem, 9vw, 7.2rem) 0;
}

.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.eyebrow {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.6rem);
  margin: 0;
}

.hero-title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(3rem, 10vw, 9rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--accent-strong);
}

.hero-title span {
  color: var(--accent);
}

.hero-caption {
  margin-top: auto;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  letter-spacing: 0.03em;
  text-align: right;
}

.hero-cta {
  display: inline-block;
  margin-top: 1.8rem;
  padding: 0.85rem 1.4rem;
  color: #f0e8da;
  background: var(--accent-strong);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(94, 24, 3, 0.25);
}

.section-heading {
  margin-bottom: 1.6rem;
}

.section-heading h2 {
  margin: 0.35rem 0 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--accent-strong);
}

.about {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-label {
  position: sticky;
  top: 6rem;
}

.about-label-name {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: clamp(2rem, 3.5vw, 3rem);
  color: var(--accent);
  margin: 0;
  line-height: 1;
}

.about-label-is {
  color: var(--muted);
  margin: 0.4rem 0 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.about-accordion {
  display: flex;
  flex-direction: column;
}

.about-item {
  border-top: 1px solid var(--line);
}

.about-item:last-child {
  border-bottom: 1px solid var(--line);
}

.about-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.2rem 0;
  color: var(--text);
  font-family: "Fraunces", serif;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  text-align: left;
  transition: color 180ms ease;
}

.about-item-header:hover {
  color: var(--accent-strong);
}

.about-item-toggle {
  color: var(--accent);
  font-size: 1.4rem;
  font-family: "Manrope", sans-serif;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 1rem;
}

.about-item-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 420ms cubic-bezier(0.16, 1, 0.3, 1),
              padding-bottom 420ms ease;
}

.about-item.open .about-item-body {
  max-height: 600px;
  padding-bottom: 1.6rem;
}

.about-item-body p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  max-width: 62ch;
}

.about-item-body--stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.stack-group {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.stack-label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  width: 80px;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.stack-tags span {
  border: 1px solid var(--accent);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.88rem;
  background: transparent;
  transition: background 180ms ease, color 180ms ease;
}

.stack-tags span:hover {
  background: var(--accent);
  color: var(--panel);
}

.projects {
  padding-bottom: 4.5rem;
}

.project-list {
  display: grid;
  gap: 1.2rem;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(245, 237, 226, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(94, 24, 3, 0.08), 0 2px 6px rgba(30, 17, 10, 0.04);
}

.project-card.format-iphone {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.project-card.format-desktop {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.project-body h3 {
  margin: 0;
  color: var(--accent-strong);
  font-family: "Fraunces", serif;
  font-size: clamp(1.45rem, 3.8vw, 3.1rem);
}

.project-meta {
  margin-top: 0.45rem;
  color: var(--muted);
  line-height: 1.5;
}

.kw {
  color: var(--accent-strong);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.project-bullets {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.project-bullets li {
  line-height: 1.55;
}

.project-tech {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-tech span {
  border: 1px solid var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.9rem;
}

.project-link {
  display: inline-block;
  margin-top: 0.95rem;
  color: var(--accent-strong);
  text-underline-offset: 3px;
}

.inline-link {
  margin-top: 0;
  margin-left: 0.3rem;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.project-visual {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(240, 232, 218, 0.9), rgba(204, 185, 153, 0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-visual.iphone {
  width: 280px;
  height: 220px;
  border-radius: 36px;
  background: #f0e8da;
  position: relative;
  box-shadow: inset 0 0 0 11px #d4c4b0, 0 0 0 1px var(--line);
}

.project-visual.iphone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 45%;
  height: 26px;
  background: #d4c4b0;
  border-radius: 0 0 22px 22px;
  z-index: 2;
}

.project-visual.iphone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-visual.desktop {
  width: 280px;
  height: 220px;
  border-radius: 14px;
}

.project-visual.desktop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 12px;
}

.site-footer {
  width: min(1140px, 92vw);
  margin: 0 auto;
  padding: 1.4rem 0 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.resume-btn {
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.resume-btn:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
}

.reveal.in {
  animation: reveal-up 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-label {
    position: static;
  }

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

  .project-visual.desktop {
    width: 280px;
    height: 200px;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 1rem 1rem;
  }

  .site-nav a {
    padding: 0.5rem 0.75rem;
  }

  .about-label-name {
    font-size: 1.8rem;
  }

  .site-footer {
    flex-direction: column;
    padding-bottom: 1.6rem;
  }
}
