/* ==========================================================================
   FRANCISCO JOAQUIN GARCIA — PORTFOLIO
   Editorial minimal aesthetic, inspired by print portfolio layout
   ========================================================================== */

:root {
  --bg: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #555555;
  --rule: #e8e8e8;
  --accent: #1a1a1a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  font-weight: 300;
  font-style: italic;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  font-weight: 700;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--bg);
  mix-blend-mode: normal;
}

.brand {
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.brand-name {
  display: block;
  font-weight: 500;
}

.brand-tag {
  display: block;
  font-weight: 300;
  color: var(--ink-soft);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  font-size: 13px;
  letter-spacing: 0.05em;
}

nav a {
  position: relative;
  padding-bottom: 2px;
}

nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

main {
  padding-top: 120px;
  min-height: 100vh;
}

.page-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ============================================
   HOME / COVER PAGE
   ============================================ */

#home {
  padding-top: 0;
}

.cover {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 96px;
  box-sizing: border-box;
}

.cover-image-link {
  display: block;
  width: 33%;
}

.cover-image-link img {
  width: 100%;
  height: auto;
  display: block;
}

.cover-title {
  position: absolute;
  top: 140px;
  left: 48px;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.05;
  max-width: 60%;
}

.cover-title small {
  display: block;
  font-size: 0.55em;
  color: var(--ink-soft);
  margin-top: 4px;
}

.cover-meta {
  position: absolute;
  top: 140px;
  right: 48px;
  text-align: right;
  font-size: 14px;
  line-height: 1.4;
}

.cover-meta .year {
  font-size: 18px;
  display: block;
}

.cover-meta .label {
  color: var(--ink-soft);
  display: block;
}

.cover-image {
  position: absolute;
  right: 80px;
  bottom: 80px;
  width: 26%;
  max-width: 360px;
  aspect-ratio: 3/4;
  background: #d8d8d8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-style: normal;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-footer {
  position: absolute;
  bottom: 40px;
  left: 48px;
  right: 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

.scroll-hint {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-style: normal;
  animation: fadeInOut 2.5s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============================================
   WORK INDEX PAGE
   ============================================ */

.section-title {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--ink-soft);
  margin-bottom: 80px;
  padding-top: 40px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 80px 60px;
  padding-bottom: 120px;
}

.project-card {
  display: block;
  cursor: pointer;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 4/5;
  background: #e8e8e8;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-thumb img {
  transform: scale(1.03);
}

.project-card:hover {
  opacity: 1;
}

.project-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.project-name {
  font-style: italic;
}

.project-number {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* Stagger work grid items */
.work-grid .project-card:nth-child(odd) {
  margin-top: 0;
}
.work-grid .project-card:nth-child(even) {
  margin-top: 80px;
}

/* ============================================
   GALLERY PAGE (individual project)
   ============================================ */

.gallery-header {
  padding-top: 20px;
  padding-bottom: 100px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 40px;
  margin-bottom: 80px;
}

.gallery-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1;
}

.gallery-meta {
  text-align: right;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.gallery-meta .meta-label {
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 11px;
  margin-right: 8px;
}

/* Editorial gallery layouts - mimicking print spreads */
.spread {
  margin-bottom: 120px;
  display: grid;
  gap: 40px;
}

/* Layout: two images side by side, equal */
.spread.duo {
  grid-template-columns: 1fr 1fr;
}

/* Layout: one large, one offset smaller */
.spread.asymmetric {
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
}

.spread.asymmetric.reverse {
  grid-template-columns: 1fr 1.4fr;
}

/* Layout: single centered image */
.spread.solo {
  grid-template-columns: 1fr;
  max-width: 65%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 120px;
}

.spread.solo.left {
  margin-left: 0;
}

.spread.solo.right {
  margin-right: 0;
}

/* Layout: polaroid grid (4 columns) */
.spread.polaroid-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 32px;
}

.spread.polaroid-grid .frame {
  aspect-ratio: 1/1.2;
  background: #f0f0f0;
  border: 8px solid #fafafa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Gallery frames follow natural image size */
#gallery .frame {
  aspect-ratio: unset;
  background: none;
}

#gallery .frame img {
  width: 100%;
  height: auto;
  object-fit: unset;
}

/* Generic image frames */
.frame {
  position: relative;
  background: #ececec;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-style: normal;
  transition: opacity 0.4s ease;
}

.frame.portrait { aspect-ratio: 3/4; }
.frame.landscape { aspect-ratio: 4/3; }
.frame.square { aspect-ratio: 1/1; }
.frame.tall { aspect-ratio: 2/3; }
.frame.wide { aspect-ratio: 16/9; }

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gallery navigation footer */
.gallery-nav {
  display: flex;
  justify-content: space-between;
  padding: 60px 0 120px;
  border-top: 1px solid var(--rule);
  margin-top: 40px;
  font-size: 13px;
}

.gallery-nav a {
  font-style: italic;
}

.gallery-nav .nav-label {
  display: block;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding-top: 40px;
  padding-bottom: 120px;
  align-items: start;
}

.about-image {
  aspect-ratio: 3/4;
  background: #e8e8e8;
}

.about-text {
  padding-top: 20px;
  font-size: 16px;
  line-height: 1.7;
  max-width: 480px;
}

.about-text h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 300;
  font-style: italic;
  margin-bottom: 40px;
  line-height: 1.1;
}

.about-text p {
  margin-bottom: 24px;
}

.about-details {
  margin-top: 48px;
  font-size: 13px;
  color: var(--ink-soft);
}

.about-details .row {
  display: grid;
  grid-template-columns: 120px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  gap: 20px;
}

.about-details .row:first-child {
  border-top: 1px solid var(--rule);
}

.about-details .label {
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
}

/* ============================================
   ABOUT PAGE — MINIMAL
   ============================================ */

.about-minimal {
  padding-top: 80px;
}

.about-minimal h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.1;
  margin-bottom: 12px;
}

.about-location {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ============================================
   CONTACT PAGE — "REACH ME"
   ============================================ */

.contact-wrap {
  min-height: calc(100vh - 200px);
  position: relative;
  display: flex;
  align-items: center;
}

.contact-left {
  padding-top: 20px;
}

.reach-line {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 80px;
  padding: 32px 0;
}

.reach-label {
  font-weight: 700;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-right: 16px;
}

.reach-item {
  font-style: italic;
  font-size: 14px;
}

.contact-image {
  max-width: 300px;
  margin-left: 80px;
}

.contact-image img {
  width: 100%;
  height: auto;
  display: block;
}

.contact-intro {
  max-width: 520px;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 60px;
}

.contact-intro h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 300;
  font-style: italic;
  margin-bottom: 32px;
  line-height: 1.1;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  padding: 40px 48px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-style: normal;
}

/* ============================================
   ENTRANCE ANIMATIONS
   ============================================ */

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-up.d1 { animation-delay: 0.1s; }
.fade-up.d2 { animation-delay: 0.25s; }
.fade-up.d3 { animation-delay: 0.4s; }
.fade-up.d4 { animation-delay: 0.55s; }
.fade-up.d5 { animation-delay: 0.7s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  header {
    padding: 20px 24px;
    flex-direction: column;
    gap: 16px;
  }

  nav ul {
    gap: 20px;
    font-size: 12px;
  }

  main {
    padding-top: 140px;
  }

  .page-wrap {
    padding: 0 24px;
  }

  .cover-title {
    position: static;
    padding: 0 24px;
    max-width: 100%;
    font-size: 28px;
    margin-bottom: 24px;
  }

  .cover-meta {
    position: static;
    text-align: left;
    padding: 0 24px;
    margin-bottom: 40px;
  }

  .cover-image {
    position: static;
    transform: none;
    width: 60%;
    margin: 0 auto 60px;
    max-width: 280px;
  }

  .cover-footer {
    position: static;
    padding: 40px 24px;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

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

  .work-grid .project-card:nth-child(even) {
    margin-top: 0;
  }

  .gallery-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 32px;
    margin-bottom: 48px;
  }

  .gallery-meta {
    text-align: left;
  }

  .cover-image-link {
    width: 75%;
  }

  .spread.duo,
  .spread.asymmetric,
  .spread.asymmetric.reverse {
    grid-template-columns: 1fr;
    margin-bottom: 60px;
  }

  .spread.solo,
  .spread.solo.left,
  .spread.solo.right {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 60px;
  }

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

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

  .reach-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

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

  .contact-image {
    width: 140px;
    margin-top: 20px;
  }

  footer {
    padding: 24px;
    flex-direction: column;
    gap: 8px;
  }
}
