/* ============================================
   ANNAFIU.COM — main.css
   Shared styles for all pages
   ============================================ */

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

:root {
  --sans: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --bg: #f5f4f0;
  --text: #1a1a18;
  --muted: #888880;
  --light: #b8b8b0;
  --border: #ddddd8;
  --white: #ffffff;
  --t: 0.26s cubic-bezier(0.4,0,0.2,1);
}

html { font-size: 14px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  background: var(--bg); border-bottom: 1px solid var(--border);
  height: 52px; display: flex; align-items: center;
  padding: 0 40px; justify-content: space-between;
}
.nav-logo {
  font-size: 13px; font-weight: 400; color: var(--text);
  text-decoration: none; letter-spacing: 0.01em; white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 13px; font-weight: 300; color: var(--muted);
  text-decoration: none; transition: color var(--t); letter-spacing: 0.01em;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

/* hamburger (mobile) */
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; border: none; background: none; padding: 4px;
}
.nav-burger span {
  display: block; width: 22px; height: 1px;
  background: var(--text); transition: all var(--t);
}
.mobile-menu {
  display: flex; position: fixed; top: 52px; left: 0; right: 0;
  background: rgba(245,244,240,0.96); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); z-index: 200;
  padding: 20px 40px; flex-direction: column; gap: 0;
  border-bottom: 1px solid var(--border);
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: opacity var(--t), transform var(--t);
}
.mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: all; }
.mobile-menu a {
  font-size: 16px; font-weight: 300; color: var(--text);
  text-decoration: none; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ── MAIN CONTENT WRAPPER ── */
main { padding-top: 52px; min-height: 100vh; }

/* ── PAGE HEADER ── */
.page-header {
  padding: 56px 40px 40px;
  max-width: 1200px; margin: 0 auto;
}
.page-label {
  font-size: 11px; font-weight: 400; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--light);
  display: block; margin-bottom: 12px;
}
.page-title {
  font-size: clamp(24px, 3.5vw, 36px); font-weight: 300;
  letter-spacing: -0.03em; line-height: 1.15;
}

/* ── INNER CONTENT ── */
.content-wrap {
  max-width: 900px; margin: 0 auto; padding: 0 40px 80px;
}
.content-wrap-wide {
  max-width: 1200px; margin: 0 auto; padding: 0 40px 80px;
}

/* ── BACK LINK ── */
.back-link {
  display: inline-block; font-size: 12px; color: var(--muted);
  text-decoration: none; letter-spacing: 0.02em;
  transition: color var(--t); margin-bottom: 40px; text-align: left; width: 100%; 
}
.back-link:hover { color: var(--text); }

/* ── TYPOGRAPHY ── */
.section-label {
  font-size: 11px; font-weight: 400; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--light);
  display: block; margin-bottom: 24px;
}
.body-text {
  font-size: 15px; font-weight: 300; line-height: 1.85; color: var(--text);
}
.body-text p { margin-bottom: 18px; }
.body-text p:last-child { margin-bottom: 0; }
.body-text h2 {
  font-size: 17px; font-weight: 400; letter-spacing: -0.02em;
  margin: 40px 0 16px;
}
.body-text blockquote {
  border-left: 1px solid var(--text); padding-left: 24px;
  margin: 36px 0; font-size: 17px; font-weight: 300;
  color: var(--muted); font-style: italic; line-height: 1.6;
}

/* ── TWO COLUMN ── */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; text-align: left;
}

/* ── SECTION BLOCK ── */
.section-block { margin-bottom: 56px; }

/* ── META / DETAIL ROWS ── */
.detail-row {
  padding: 12px 0; border-bottom: 1px solid var(--border);
  display: flex; gap: 32px;
}
.detail-row:first-of-type { border-top: 1px solid var(--border); }
.detail-key { font-size: 12px; color: var(--light); min-width: 72px; font-weight: 300; }
.detail-val { font-size: 13px; font-weight: 300; color: var(--text); }

/* ── SKILL / TOOL ROWS ── */
.skill-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 300;
}
.skill-row:first-of-type { border-top: 1px solid var(--border); }
.tool-row {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 300;
}
.tool-row:first-of-type { border-top: 1px solid var(--border); }
.tool-type { color: var(--light); }

/* ── EXPERIENCE ROWS ── */
.exp-row { padding: 20px 0; border-bottom: 1px solid var(--border); }
.exp-row:first-of-type { border-top: 1px solid var(--border); }
.exp-top {
  display: flex; justify-content: space-between;
  align-items: baseline; margin-bottom: 4px; gap: 12px;
}
.exp-role { font-size: 14px; font-weight: 400; }
.exp-date { font-size: 12px; color: var(--light); flex-shrink: 0; }
.exp-company { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.exp-desc { font-size: 13px; font-weight: 300; color: var(--muted); line-height: 1.7; }

/* ── FILTER BAR ── */
.filter-bar {
  padding: 18px 40px;
  display: flex; align-items: center; justify-content: center;
  gap: 4px; border-bottom: 1px solid var(--border);
  background: var(--bg); flex-wrap: wrap; position: sticky; top: 52px; z-index: 10;
}
.filter-tag {
  font-size: 12px; font-weight: 300; color: var(--muted);
  padding: 5px 12px; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; transition: all var(--t); background: none;
  font-family: var(--sans); letter-spacing: 0.02em;
}
.filter-tag:hover { color: var(--text); border-color: var(--border); }
.filter-tag.active { color: var(--text); border-color: var(--text); }

/* ── PORTFOLIO GRID ── */
.portfolio-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: 1440px; margin: 0 auto;
}
.port-item {
  position: relative; overflow: hidden; cursor: pointer;
  aspect-ratio: 1/1; background-color: var(--port-color, #eee);
  background-size: cover; background-position: center;
  transition: filter var(--t);
}
.port-item:hover { filter: brightness(0.94); }
.port-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 20px 18px;
  background: linear-gradient(to top, rgba(20,20,18,0.5), transparent);
  opacity: 0; transform: translateY(4px);
  transition: all var(--t); text-align: left;
}
.port-item:hover .port-info { opacity: 1; transform: translateY(0); }
.port-info-title { font-size: 14px; font-weight: 400; color: #fff; margin-bottom: 3px; }
.port-info-tags { font-size: 11px; font-weight: 300; color: rgba(255,255,255,0.75); letter-spacing: 0.02em; }

/* ── JOURNAL LIST ── */
.journal-list { border-top: 1px solid var(--border); }
.journal-row {
  display: grid; grid-template-columns: 96px 1fr 80px;
  align-items: baseline; gap: 32px;
  padding: 22px 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: opacity var(--t);
}
.journal-row:hover .jrow-title { color: var(--muted); }
.jrow-date { font-size: 12px; color: var(--light); font-weight: 300; }
.jrow-title { font-size: 15px; font-weight: 300; color: var(--text); letter-spacing: -0.01em; transition: color var(--t); }
.jrow-cat { font-size: 11px; color: var(--light); text-align: right; }

/* ── PAGINATION ── */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; margin-top: 40px; flex-wrap: wrap;
}
.page-num {
  font-size: 13px; font-family: var(--sans); color: var(--muted);
  border: 1px solid transparent; background: none;
  padding: 4px 10px; cursor: pointer; transition: all var(--t); border-radius: 2px;
}
.page-num:hover { color: var(--text); border-color: var(--border); }
.page-num.active { color: var(--text); border-color: var(--text); font-weight: 400; }
.page-nav-arrow {
  font-size: 13px; font-family: var(--sans); color: var(--muted);
  border: none; background: none; padding: 4px 8px;
  cursor: pointer; transition: color var(--t);
}
.page-nav-arrow:hover:not(:disabled) { color: var(--text); }
.page-nav-arrow:disabled { color: var(--border); cursor: not-allowed; }

/* ── POST NAV (prev/next) ── */
.post-nav {
  display: flex; justify-content: space-between;
  align-items: center; margin-top: 64px;
  padding-top: 40px; border-top: 1px solid var(--border);
}
.post-nav a {
  font-size: 12px; font-weight: 300; color: var(--muted);
  text-decoration: none; transition: color var(--t);
}
.post-nav a:hover { color: var(--text); }

/* ── PROJECT META ── */
.meta-row {
  padding: 12px 0; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 3px;
}
.meta-row:first-child { border-top: 1px solid var(--border); }
.meta-key { font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; color: var(--light); }
.meta-val { font-size: 13px; font-weight: 300; color: var(--text); }

/* ── CONTACT ── */
.contact-image {
  width: 100%; aspect-ratio: 3/2; background: var(--border);
  margin-bottom: 56px; overflow: hidden;
}
.contact-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contact-block-title {
  font-size: 11px; font-weight: 400; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--light); margin-bottom: 28px;
}
.contact-name {
  font-size: clamp(18px, 2.5vw, 22px); font-weight: 300;
  letter-spacing: -0.02em; margin-bottom: 24px;
}
.contact-line { font-size: 14px; font-weight: 300; color: var(--muted); line-height: 2; }
.contact-line a {
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border); transition: border-color var(--t);
}
.contact-line a:hover { border-bottom-color: var(--text); }
.avail-indicator {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 12px; color: var(--muted); font-weight: 300; margin-top: 32px;
}
.avail-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #5aaa70;
  animation: blink 2.5s ease-in-out infinite; flex-shrink: 0;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:.3;} }

/* ── ABOUT ── */
.about-photo {
  width: 100%; aspect-ratio: 16/6; background: var(--white);
  border: 1px solid var(--border); overflow: hidden; margin-bottom: 56px;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── PROJECT HERO ── */
.project-hero {
  width: 100%; aspect-ratio: 16/9; overflow: hidden;
  background: #d8d8d2; cursor: zoom-in;
}
.project-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-cols {
  display: grid; grid-template-columns: 1fr 260px;
  gap: 64px; margin-bottom: 64px; align-items: start;
}
.project-gallery-label {
  font-size: 11px; font-weight: 400; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--light);
  margin-bottom: 20px; display: block; text-align: center;
}
.project-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }
.project-gallery img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  display: block; cursor: zoom-in; background: #ddd;
  transition: opacity var(--t);
}
.project-gallery img:hover { opacity: 0.88; }
.project-gallery img.wide { grid-column: span 2; aspect-ratio: 16/9; }

/* ── LIGHTBOX ── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 500;
  align-items: center; justify-content: center; padding: 32px;
  background: rgba(10,10,8,0.93);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; display: block; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  font-size: 22px; color: rgba(255,255,255,0.55); cursor: pointer;
  border: none; background: none; font-family: var(--sans); line-height: 1;
  transition: color 0.2s ease;
}
.lightbox-close:hover { color: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .project-cols { grid-template-columns: 1fr; gap: 40px; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .about-photo { aspect-ratio: 16/9; }
}
@media (max-width: 600px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .page-header { padding: 36px 20px 28px; }
  .content-wrap, .content-wrap-wide { padding: 0 20px 60px; }
  .filter-bar { padding: 14px 20px; }
  .journal-row { grid-template-columns: 72px 1fr; gap: 16px; }
  .jrow-cat { display: none; }
  .project-gallery { grid-template-columns: 1fr; }
  .project-gallery img.wide { grid-column: span 1; aspect-ratio: 4/3; }
  .mobile-menu { padding: 12px 20px; }
  .post-nav { flex-direction: column; gap: 0; }
  .post-nav a { border-bottom: 1px solid var(--border); width: 100%; padding: 18px 0; text-align: center; display: block; }
}
@media (max-width: 400px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}
