/* ============================================================
   FONT
   ============================================================ */
@font-face {
  font-family: 'BiroScript';
  src: url('Biro_Script_reduced.otf') format('opentype'),
       url('Biro_Script_reduced.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #404B33;
  --bg-light:     #4a5a3a;
  --bg-dark:      #353f2a;
  --text:         #ffffff;
  --text-muted:   rgba(255,255,255,0.62);
  --text-faint:   rgba(255,255,255,0.35);
  --border:       rgba(255,255,255,0.15);
  --font-hand:    'BiroScript', cursive;
  --font-body:    'Source Sans 3', sans-serif;
  --font-serif:   'Lora', serif;
  --radius:       6px;
  --transition:   0.22s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
a:hover { opacity: 0.75; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 14px 48px;
  background-color: rgba(53, 63, 42, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav__name {
  font-family: var(--font-hand);
  font-size: 2rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.nav__name:hover { opacity: 0.8; }

.nav__links {
  display: flex;
  gap: 32px;
  margin-left: auto;
}

.nav__links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--text);
  transition: width var(--transition);
}
.nav__links a:hover,
.nav__active { color: var(--text) !important; }
.nav__links a:hover::after,
.nav__active::after { width: 100% !important; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav__toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text);
  border-radius: 2px;
}

/* ============================================================
   HOME
   ============================================================ */
.home {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 64px 56px 80px;
  min-height: calc(100vh - 60px);
  align-items: start;
}

.home__left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Post-it drawing */
.postit {
  background: #f7e96b;
  padding: 14px 14px 28px 14px;
  box-shadow: 3px 4px 12px rgba(0,0,0,0.35), 1px 1px 3px rgba(0,0,0,0.15);
  width: fit-content;
  transform: rotate(-1.5deg);
  transition: transform 0.2s ease;
}
.postit:hover { transform: rotate(0deg) scale(1.02); }

.postit__img {
  display: block;
  width: 200px;
  /* keep the white background of the sketch, mix-blend makes lines visible on yellow */
  mix-blend-mode: multiply;
}

/* Bio */
.bio__title {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}
.bio__major {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Meta */
.meta { display: flex; flex-direction: column; gap: 10px; }
.meta__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.meta__item a { color: var(--text-muted); }
.meta__item a:hover { color: var(--text); }
.meta__icon { width: 16px; height: 16px; flex-shrink: 0; }

/* Right */
.home__right {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.welcome__heading {
  font-family: var(--font-hand);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: normal;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 20px;
}

.welcome__text {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  max-width: 520px;
}

/* Featured image */
.featured-image__placeholder {
  width: 100%;
  max-width: 520px;
  height: 260px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.featured-image__placeholder span {
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ============================================================
   INNER PAGES
   ============================================================ */
.page {
  padding: 64px 56px 80px;
  min-height: calc(100vh - 60px);
}

.section__inner { max-width: 760px; }

.section__heading {
  font-family: var(--font-hand);
  font-size: 2.4rem;
  font-weight: normal;
  color: var(--text);
  margin-bottom: 32px;
  letter-spacing: 0.01em;
}

.section__sub {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

/* ============================================================
   PROJECTS — plain text
   ============================================================ */
.project-item {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.project-item:last-child { border-bottom: none; }

.project-item__title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.project-item__body {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 600px;
}

.project-item__tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 10px;
}

/* ============================================================
   PUBLICATIONS
   ============================================================ */
.pub-list { display: flex; flex-direction: column; gap: 28px; }
.pub-item { display: flex; gap: 24px; align-items: flex-start; }
.pub-item__year {
  font-size: 0.82rem;
  color: var(--text-faint);
  min-width: 44px;
  padding-top: 3px;
  font-weight: 500;
}
.pub-item__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 4px;
}
.pub-item__details {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.pub-item__details a { color: var(--text-muted); }

/* ============================================================
   CV
   ============================================================ */
.cv-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
  margin-bottom: 52px;
}
.cv-download:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.35);
  opacity: 1;
}

.cv-block { margin-top: 36px; }
.cv-block h3 {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: 20px;
  font-weight: 600;
}
.cv-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.cv-item__year {
  font-size: 0.75rem;
  color: var(--text-faint);
  min-width: 180px;
  max-width: 180px;
  padding-top: 3px;
  line-height: 1.5;
  flex-shrink: 0;
}
.cv-item__title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
.cv-item__sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================================
   OTHER — section nav + flip cards + bakeries
   ============================================================ */
.other-nav {
  display: flex;
  gap: 24px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.other-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.other-nav a:hover { color: var(--text); opacity: 1; }

.other-section { margin-bottom: 72px; }
.other-section__title {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: 28px;
}

/* Flip cards */
.flip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.flip-card {
  height: 280px;
  cursor: pointer;
  perspective: 1000px;
}

.flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card__inner {
  transform: rotateY(180deg);
}

.flip-card__front,
.flip-card__back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backface-visibility: hidden;
  overflow: hidden;
}

.flip-card__front {
  background: var(--bg-light);
  border: 1px solid var(--border);
}
.flip-card__front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.flip-card__front-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.flip-card__back {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  transform: rotateY(180deg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.flip-card__back-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.flip-card__back-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.flip-card__back a {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Bakeries list */
.bakery-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bakery-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.bakery-item:last-child { border-bottom: none; }
.bakery-item__name {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}
.bakery-item__city {
  font-size: 0.8rem;
  color: var(--text-faint);
}
.bakery-item__link {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-faint);
  text-decoration: none;
  white-space: nowrap;
}
.bakery-item__link:hover { color: var(--text); opacity: 1; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 24px 56px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.footer a { color: var(--text-faint); }
.footer a:hover { color: var(--text); opacity: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .home {
    grid-template-columns: 1fr;
    padding: 40px 24px 60px;
    gap: 36px;
  }
  .page  { padding: 40px 24px 60px; }
  .nav   { padding: 12px 24px; }
  .footer { padding: 20px 24px; }

  .nav__links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 14px;
  }
  .nav__links.open { display: flex; }
  .nav__toggle { display: flex; }

  .flip-grid { grid-template-columns: repeat(2, 1fr); }
}
