/* ============================================
   PROFESSOR PORTFOLIO — MINIMALIST
   Palette: Paper · Stone · Coral · Black
   Type: Cormorant Garamond + Inter
   ============================================ */

:root {
  --ivory: #f6f4f1; /* Paper  */
  --ink: #000000; /* Black  */
  --sage: #f95c4b; /* Coral  */
  --muted: #7a7268; /* warm mid derived from Stone */
  --rule: #e4ded2; /* Stone  */
  --card-bg: #ede9e3; /* Stone-light */
  --white: #f6f4f1; /* Paper  */

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;

  --max-w: 1120px;
  --section-pad: 100px;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}
em {
  font-style: italic;
}
img,
svg {
  display: block;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  background: transparent;
  transition:
    background 0.3s,
    box-shadow 0.3s,
    padding 0.3s;
}

.nav.scrolled {
  background: rgba(247, 247, 244, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--rule);
  padding: 16px 48px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  transition:
    transform 0.25s,
    opacity 0.25s;
}

/* ── Mobile Menu ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--ivory);
  z-index: 90;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--ink);
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--sage);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 48px 80px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--rule);
}

.hero-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 24px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 10vw, 9.5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 32px;
}

.hero-name em {
  font-style: italic;
  color: var(--sage);
}

.hero-rule {
  width: 56px;
  height: 1px;
  background: var(--ink);
  margin-bottom: 28px;
}

.hero-tagline {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 36px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 48px;
}

.dot {
  color: var(--rule);
}

.hero-scroll {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.hero-scroll:hover {
  color: var(--sage);
}

.hide-mobile {
  display: inline;
}

/* ── Section Layout ── */
.section {
  padding: var(--section-pad) 48px;
  border-top: 1px solid var(--rule);
}

.section-alt {
  background: var(--card-bg);
}

.section-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 64px;
}

.section-label {
  padding-top: 6px;
}

.section-label span {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  user-select: none;
}

.section-body {
  min-width: 0;
}

.section-intro {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 48px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 24px;
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
}

.about-photo {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.photo-placeholder {
  width: 100%;
  aspect-ratio: 6/7;
  overflow: hidden;
  border-radius: 2px;
}

.photo-placeholder svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-caption p {
  font-size: 0.8rem;
  color: var(--ink);
  font-weight: 400;
}

.photo-caption .muted {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 300;
}

.about-text-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lead-text {
  font-size: 1.18rem;
  line-height: 1.65;
  font-weight: 300;
  color: var(--ink);
}

.about-text-col p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.75;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 12px;
}

.stat {
  background: var(--ivory);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-alt .stat {
  background: var(--card-bg);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Research ── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.research-card {
  background: var(--ivory);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 0.25s;
}

.research-card:hover {
  background: var(--white);
}

.card-index {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--sage);
  letter-spacing: 0.04em;
}

.research-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
}

.research-card p {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.75;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.card-tags span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 3px 8px;
}

/* ── Publications ── */
.pub-list {
  display: flex;
  flex-direction: column;
}

.pub-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.2s;
}

.pub-item:first-child {
  border-top: 1px solid var(--rule);
}

.pub-year {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 3px;
  font-weight: 400;
}

.pub-content h4 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 6px;
}

.pub-authors {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 3px;
}

.pub-journal {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.pub-links {
  display: flex;
  gap: 16px;
}

.pub-links a {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.pub-links a:hover {
  border-color: var(--sage);
}

.underline-link {
  border-bottom: 1px solid var(--muted);
  transition:
    color 0.2s,
    border-color 0.2s;
}

.underline-link:hover {
  color: var(--sage);
  border-color: var(--sage);
}

/* ── Teaching ── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-bottom: 48px;
}

.course-item {
  background: var(--card-bg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.25s;
}

.course-item:hover {
  background: var(--ivory);
}

.course-code {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 400;
}

.course-item h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.3;
}

.course-item p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.course-term {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.advising-box {
  border: 1px solid var(--rule);
  padding: 36px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--ivory);
}

.advising-box h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--ink);
}

.advising-box p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 640px;
}

.btn-outline {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 10px 20px;
  transition:
    background 0.2s,
    color 0.2s;
  align-self: flex-start;
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--ivory);
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 16px;
}

.contact-info > p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 32px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  margin-bottom: 28px;
}

.contact-item {
  display: flex;
  gap: 20px;
  font-size: 0.86rem;
}

.contact-label {
  width: 90px;
  flex-shrink: 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 1px;
}

.contact-item a {
  color: var(--sage);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.contact-item a:hover {
  border-color: var(--sage);
}

.social-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.social-links a {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.social-links a:hover {
  color: var(--sage);
  border-color: var(--sage);
}

/* ── Form ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--sage);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8A85' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.btn-send {
  background: var(--ink);
  color: var(--ivory);
  border: 1px solid var(--ink);
  padding: 13px 28px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
  align-self: flex-start;
}

.btn-send:hover {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--ivory);
}

.form-note {
  font-size: 0.8rem;
  color: var(--sage);
  min-height: 1.2em;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--rule);
  padding: 48px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
}

.footer-dept {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-copy {
  font-size: 0.74rem;
  color: var(--rule);
  margin-top: 12px;
  color: var(--muted);
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  :root {
    --section-pad: 64px;
  }

  .nav {
    padding: 20px 24px;
  }
  .nav.scrolled {
    padding: 14px 24px;
  }
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 0 24px 60px;
  }

  .section {
    padding: var(--section-pad) 24px;
  }

  .section-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-label span {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-photo-col {
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .photo-placeholder {
    width: 120px;
    flex-shrink: 0;
  }

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

  .research-grid {
    grid-template-columns: 1fr;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer {
    padding: 40px 24px;
  }
}

@media (max-width: 560px) {
  .hero-name {
    font-size: clamp(3.2rem, 16vw, 5rem);
  }
  .hero-meta {
    font-size: 0.7rem;
    gap: 6px;
  }
  .hide-mobile {
    display: none;
  }
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .pub-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .pub-year {
    font-size: 0.7rem;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
