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

:root {
  --cream: #EDEAE4;
  --cream-dark: #E3DFD8;
  --ink: #1C1C1A;
  --ink-mid: #4A4A46;
  --ink-light: #9A9A94;
  --coral: #C0392B;
  --coral-light: #E8503A;
  --line: rgba(28,28,26,0.15);
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Grain overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* ── Layout ── */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Circular Logo ── */
.logo-wrap {
  padding: 48px 0 40px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.1s forwards;
}

.logo-circle {
  position: relative;
  width: 88px;
  height: 88px;
  cursor: pointer;
}

.logo-circle svg {
  width: 88px;
  height: 88px;
  animation: rotateSlow 18s linear infinite;
  transform-origin: center;
}

.logo-circle svg text {
  fill: var(--coral);
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.logo-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-center-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  transition: transform 0.3s ease;
}

.logo-circle:hover .logo-center-dot {
  transform: scale(2);
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Accordion ── */
.accordion {
  border-top: 1px solid var(--line);
  margin-bottom: 80px;
}

.acc-item {
  border-bottom: 1px solid var(--line);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.acc-item:nth-child(1) { animation-delay: 0.2s; }
.acc-item:nth-child(2) { animation-delay: 0.3s; }
.acc-item:nth-child(3) { animation-delay: 0.4s; }
.acc-item:nth-child(4) { animation-delay: 0.5s; }
.acc-item:nth-child(5) { animation-delay: 0.6s; }
.acc-item:nth-child(6) { animation-delay: 0.7s; }
.acc-item:nth-child(7) { animation-delay: 0.75s; }
.acc-item:nth-child(8) { animation-delay: 0.8s; }

.acc-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  cursor: pointer;
  user-select: none;
  list-style: none;
  gap: 16px;
  transition: color 0.2s ease;
}

.acc-trigger::-webkit-details-marker { display: none; }

.acc-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.2;
  transition: color 0.25s ease;
}

.acc-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.35s ease;
}

.acc-icon::before,
.acc-icon::after {
  content: '';
  position: absolute;
  background: var(--ink);
  transition: all 0.35s ease;
}

.acc-icon::before { width: 14px; height: 1px; }
.acc-icon::after { width: 1px; height: 14px; }

details[open] .acc-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

details[open] .acc-trigger .acc-label {
  color: var(--coral);
}

details[open] .acc-icon::before,
details[open] .acc-icon::after {
  background: var(--coral);
}

/* ── Panel content ── */
.acc-panel {
  padding: 0 0 36px;
  animation: panelOpen 0.4s ease forwards;
}

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

/* ── Bio section ── */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
}

@media (max-width: 560px) { .bio-grid { grid-template-columns: 1fr; } }

.bio-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-light);
  margin-bottom: 6px;
  font-weight: 400;
}

.bio-value {
  font-family: 'Forum', serif;
  font-size: 1.05rem;
  color: var(--ink-mid);
  line-height: 1.6;
}

.bio-bio {
  grid-column: 1 / -1;
  font-family: 'Forum', serif;
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink-mid);
  font-style: italic;
}

/* ── Story section ── */
.story-text {
  font-family: 'Forum', serif;
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--ink-mid);
  max-width: 600px;
}

.story-text p + p { margin-top: 1.2em; }

/* ── Work / Project cards ── */
.work-list { display: flex; flex-direction: column; gap: 0; }

.work-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 0 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: background 0.2s;
}

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

.no-dividers .work-item { border-bottom: none; }

.work-year {
  font-size: 0.72rem;
  color: var(--ink-light);
  letter-spacing: 0.08em;
  padding-top: 3px;
  font-weight: 400;
}

.work-name {
  font-family: 'Forum', serif;
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 4px;
}

.work-desc {
  font-size: 0.82rem;
  color: var(--ink-light);
  line-height: 1.5;
  font-weight: 300;
}

.work-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--coral);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.work-link:hover { border-bottom-color: var(--coral); }

/* ── Older projects toggle ── */
.work-item:has(+ .older-projects) { border-bottom: none; }

.older-projects { margin-top: 8px; }

.older-projects-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.2s;
}

.older-projects-trigger::-webkit-details-marker { display: none; }

.older-projects-trigger::after {
  content: '+';
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.older-projects[open] .older-projects-trigger::after {
  transform: rotate(45deg);
}

.older-projects[open] .older-projects-trigger { color: var(--ink-mid); }

.older-projects-panel {
  animation: panelOpen 0.3s ease forwards;
}

.work-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--coral);
  border: 1px solid var(--coral);
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
  font-weight: 400;
  margin-top: 3px;
}

/* ── Awards ── */
.brag-list { display: flex; flex-direction: column; gap: 20px; }

.brag-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.brag-item:last-child { border-bottom: none; padding-bottom: 0; }

.brag-num {
  font-family: 'Forum', serif;
  font-size: 1.6rem;
  color: var(--coral);
  font-style: italic;
  line-height: 1;
  min-width: 32px;
}

.brag-text {
  font-family: 'Forum', serif;
  font-size: 1.05rem;
  color: var(--ink-mid);
  line-height: 1.65;
}

.brag-title { font-weight: 500; color: var(--ink); margin-bottom: 3px; font-size: 1.1rem; }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px 24px;
  align-items: center;
}

.contact-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  font-weight: 400;
}

.contact-value {
  font-family: 'Forum', serif;
  font-size: 1.05rem;
  color: var(--ink-mid);
}

.contact-value a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.contact-value a:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.contact-value a::after {
  content: ' ↗';
  font-size: 0.8em;
  opacity: 0.6;
}

/* ── Footer ── */
footer {
  border-top: none;
  padding: 24px 0 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.6s ease 1s forwards;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--ink-light);
  letter-spacing: 0.06em;
}

.footer-loc {
  font-size: 0.72rem;
  color: var(--ink-light);
  letter-spacing: 0.06em;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hover on trigger ── */
.acc-trigger:hover .acc-label { color: var(--coral); }
details[open] .acc-trigger:hover .acc-label { color: var(--coral-light); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

/* ── Section tag ── */
.section-eyebrow {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--coral);
  margin-bottom: 20px;
  font-weight: 400;
}

/* ── Skills chips ── */
.skills-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.skill-chip {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-mid);
  transition: border-color 0.2s, color 0.2s;
}

.skill-chip:hover { border-color: var(--coral); color: var(--coral); }

/* ── Project Modal ── */
.proj-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 26, 0.55);
  z-index: 2000;
  overflow-y: auto;
  padding: 40px 24px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.proj-modal.is-open { display: block; }

.proj-modal-inner {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(28, 28, 26, 0.2);
  border-radius: 4px;
  padding: 36px;
  display: flex;
  flex-direction: column;
}

.proj-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.proj-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
}

.proj-modal-close {
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.proj-modal-close:hover {
  background: var(--ink);
  color: var(--cream);
}

.proj-modal-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  flex: 1;
}

.proj-modal-left {
  display: flex;
  flex-direction: column;
}

.proj-modal-preview {
  flex: 1;
  background: #eae7e1;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
}

.proj-modal-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.proj-modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.proj-modal-no-preview {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-light);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.proj-modal-preview-footer {
  margin-top: 10px;
}

.proj-modal-source-link {
  font-size: 0.72rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  transition: color 0.2s;
}

.proj-modal-source-link:hover { color: var(--coral); }

.proj-modal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.proj-modal-section { display: flex; flex-direction: column; }

.proj-modal-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-light);
  margin-bottom: 10px;
  font-weight: 400;
}

.proj-modal-analysis {
  font-family: 'Forum', serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-mid);
}

.proj-modal-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-stack-chip {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-mid);
}

.proj-modal-cta {
  display: block;
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: 14px 20px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  font-weight: 400;
  margin-top: auto;
  transition: background 0.2s;
}

.proj-modal-cta:hover { background: var(--coral); }

/* button reset for work-link used as button */
button.work-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

@media (max-width: 720px) {
  .proj-modal { padding: 16px 12px; }
  .proj-modal-inner { padding: 24px 20px; }
  .proj-modal-body { grid-template-columns: 1fr; }
  .proj-modal-cta { margin-top: 0; }
}

/* ── Wish list ── */
.wish-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

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

.wish-dash {
  color: var(--coral);
  font-family: 'Forum', serif;
  font-size: 1.2rem;
  line-height: 1;
  margin-top: 2px;
}

.wish-text {
  font-family: 'Forum', serif;
  font-size: 1.05rem;
  color: var(--ink-mid);
  line-height: 1.6;
}
