/* ============================================
   JAMES BARGE — Portfolio
   Editorial, left-anchored, restrained
   ============================================ */

/* --------------------------------------------
   Palette
   -------------------------------------------- */
:root {
  --mahogany: #3c1518;
  --garnet: #69140e;
  --rust: #a44200;
  --bronze: #d58936;
  --custard: #f2f3ae;

  --black: #1a0f10;
  --white: #faf9f6;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------
   Base
   -------------------------------------------- */
body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--custard);
  background: var(--mahogany);
}

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

/* --------------------------------------------
   Layout — Left-anchored
   -------------------------------------------- */
.hero,
.about,
.work,
.contact {
  padding: 4rem 2rem;
  max-width: 600px;
}

@media (min-width: 768px) {
  .hero,
  .about,
  .work,
  .contact {
    padding: 6rem 4rem;
  }
}

/* --------------------------------------------
   Label (section headers)
   -------------------------------------------- */
.label {
  display: block;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1.5rem;
}

/* --------------------------------------------
   Hero
   -------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 8rem;
  background: linear-gradient(
    160deg,
    var(--garnet) 0%,
    var(--mahogany) 40%
  );
}

.hero__label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 0.5rem;
}

.hero__name {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--custard);
  margin-bottom: 1rem;
}

.hero__intro {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--bronze);
  max-width: 400px;
  line-height: 1.4;
}

.hero__contact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--garnet);
  max-width: 200px;
}

.hero__contact a {
  color: var(--bronze);
  position: relative;
  width: fit-content;
}

.hero__contact a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--custard);
  transition: width 0.3s ease;
}

.hero__contact a:hover {
  color: var(--custard);
}

.hero__contact a:hover::after {
  width: 100%;
}

.hero__contact span {
  color: var(--rust);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* --------------------------------------------
   About — Flipped palette
   -------------------------------------------- */
.about {
  background: var(--custard);
  color: var(--mahogany);
  max-width: none;
}

.about__inner {
  max-width: 560px;
}

.about .label {
  color: var(--rust);
}

.about p {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.about p:last-child {
  margin-bottom: 0;
  font-weight: 500;
  color: var(--garnet);
}

/* --------------------------------------------
   Work
   -------------------------------------------- */
.work {
  background: var(--mahogany);
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.work__item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--garnet);
  opacity: 0;
  transform: translateY(12px);
  animation: fadeIn 0.5s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.08s);
}

.work__item:last-child {
  border-bottom: 1px solid var(--garnet);
}

.work__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.work__company {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--custard);
  transition: color 0.2s ease;
}

.work__item:hover .work__company {
  color: var(--bronze);
}

.work__role {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rust);
  flex-shrink: 0;
}

.work__desc {
  font-size: 0.9375rem;
  color: rgba(242, 243, 174, 0.7);
  line-height: 1.5;
  max-width: 480px;
}

/* Publication variant */
.work__item--alt {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(105, 20, 14, 0.2) 100%
  );
  margin-left: -2rem;
  padding-left: 2rem;
  margin-right: -2rem;
  padding-right: 2rem;
}

@media (min-width: 768px) {
  .work__item--alt {
    margin-left: -4rem;
    padding-left: 4rem;
  }
}

/* --------------------------------------------
   Contact
   -------------------------------------------- */
.contact {
  background: var(--black);
  max-width: none;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.contact .label {
  color: var(--rust);
}

.contact__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  font-size: 0.9375rem;
}

.contact__grid a {
  color: var(--custard);
  position: relative;
}

.contact__grid a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--bronze);
  transition: width 0.3s ease;
}

.contact__grid a:hover::after {
  width: 100%;
}

.contact__location {
  color: var(--rust);
}

/* --------------------------------------------
   Animations
   -------------------------------------------- */
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------
   Reduced motion
   -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------
   Print
   -------------------------------------------- */
@media print {
  body {
    background: white;
    color: black;
  }

  .about {
    background: #f5f5f5;
  }
}
