/* ============================================================
   Andriana Portfolio — Main Stylesheet v4
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --accent: #6b4fa0;
  --ink:    #18161f;
  --muted:  #8c8898;
  --border: #e4e1ee;
  --bg:     #ffffff;
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
img   { max-width: 100%; height: auto; display: block; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--accent); color: #fff;
  padding: .5rem 1rem; border-radius: 2px;
  font-size: .8rem; text-decoration: none; z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ── NAV ── */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 4rem;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s;
}
#site-header.scrolled { border-color: var(--border); }

.site-logo a {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 600;
  color: var(--ink); text-decoration: none;
}
.site-logo a:hover { color: var(--accent); }

#primary-nav ul {
  list-style: none;
  display: flex; align-items: center; gap: 2.5rem;
}
#primary-nav a {
  font-size: 0.75rem; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: color .25s;
  position: relative;
}
#primary-nav a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width .3s var(--ease);
}
#primary-nav a:hover,
#primary-nav a:focus { color: var(--ink); outline: none; }
#primary-nav a:hover::after { width: 100%; }
#primary-nav .nav-cta {
  color: var(--accent);
  border-bottom: 1px solid var(--accent); padding-bottom: 1px;
}
#primary-nav .nav-cta:hover  { opacity: 0.7; }
#primary-nav .nav-cta::after { display: none; }

.menu-toggle {
  display: none; background: none; border: none;
  cursor: pointer; padding: .25rem;
  flex-direction: column; gap: 5px;
}
.menu-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--ink); transition: transform .3s, opacity .3s;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 4rem 6rem;
  position: relative; overflow: hidden;
}
.hero-watermark {
  position: absolute; top: 50%; right: 3rem;
  transform: translateY(-50%);
  font-family: 'Playfair Display', serif;
  font-size: 22vw; font-weight: 600; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px #ebebf3;
  pointer-events: none; user-select: none;
  opacity: 0; animation: ap-fadein 1.4s .3s forwards;
}
.hero-tag {
  font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1.4rem;
  opacity: 0; animation: ap-up .7s .2s forwards;
}
.hero-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.4rem, 6.5vw, 7rem);
  font-weight: 400; line-height: 1.04; max-width: 720px;
  opacity: 0; animation: ap-up .8s .35s forwards;
}
.hero-heading em { font-style: italic; color: var(--accent); }
.hero-sub {
  margin-top: 1.8rem;
  font-size: 1rem; color: var(--muted);
  max-width: 460px; line-height: 1.75;
  opacity: 0; animation: ap-up .8s .5s forwards;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 2.8rem;
  font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink); padding-bottom: 2px;
  transition: color .25s, border-color .25s;
  opacity: 0; animation: ap-up .8s .65s forwards;
}
.hero-cta .arr { display: inline-block; transition: transform .3s var(--ease); }
.hero-cta:hover { color: var(--accent); border-color: var(--accent); }
.hero-cta:hover .arr { transform: translateX(5px); }

/* ── PORTFOLIO ── */
#portfolio {
  padding: 5rem 4rem 7rem;
  border-top: 1px solid var(--border);
}
.section-header { margin-bottom: 2.5rem; }
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 2.2vw, 2.2rem); font-weight: 400;
  margin-bottom: 2rem;
}

/* Tab bar */
.portfolio-tabs {
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
  gap: 0; overflow-x: auto;
}
.tab-btn {
  background: none; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  padding: .85rem 1.5rem .85rem 0;
  margin-right: 2rem;
  position: relative; transition: color .25s;
  margin-bottom: -1px; white-space: nowrap;
}
.tab-btn::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transition: transform .3s var(--ease);
  transform-origin: left;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--accent); }
.tab-btn.active::after { transform: scaleX(1); }

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Featured card spans full row */
.project-card.featured {
  grid-column: span 3;
  display: grid; grid-template-columns: 1fr 1fr;
}

/* Card base — button reset */
button.project-card {
  width: 100%; text-align: left;
  font: inherit; cursor: pointer;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  padding: 0;
}
button.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(107,79,160,0.09);
}

/* Thumbnail */
.card-thumbnail {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
}
.project-card.featured .card-thumbnail { aspect-ratio: auto; min-height: 240px; }

.card-thumbnail img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
button.project-card:hover .card-thumbnail img { transform: scale(1.04); }

.card-thumb-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  transition: transform .6s var(--ease);
}
button.project-card:hover .card-thumb-placeholder { transform: scale(1.04); }

/* Card body */
.card-body { padding: 1.4rem 1.6rem 1.8rem; }
.project-card.featured .card-body {
  padding: 2.5rem 3rem;
  display: flex; flex-direction: column; justify-content: center;
}

.card-category {
  font-size: 0.67rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: .5rem;
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; font-weight: 400;
  line-height: 1.2; margin-bottom: .7rem;
  color: var(--ink);
}
.project-card.featured .card-title { font-size: 1.7rem; }
.card-description { font-size: 0.875rem; color: var(--muted); line-height: 1.7; }
.card-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.card-tag {
  font-size: 0.66rem; letter-spacing: 0.05em;
  border: 1px solid var(--border); color: var(--muted);
  padding: .2rem .6rem; border-radius: 100px;
}
.card-link {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: 1rem;
  font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  transition: gap .25s;
}
button.project-card:hover .card-link { gap: .6rem; }

.tab-empty {
  padding: 3rem 0; font-size: 0.9rem; color: var(--muted);
}
.tab-empty strong { color: var(--ink); display: block; margin-bottom: .4rem; }

/* ── ABOUT ── */
#about {
  border-top: 1px solid var(--border);
  padding: 5.5rem 4rem;
  display: grid; grid-template-columns: 1fr 1.6fr;
  gap: 6rem; align-items: center;
}
.about-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 400; line-height: 1.15;
}
.about-headline em { font-style: italic; color: var(--accent); }
.about-copy p { font-size: .97rem; color: var(--muted); line-height: 1.8; }
.about-copy p + p { margin-top: 1rem; }

/* ── CONTACT ── */
#contact {
  border-top: 1px solid var(--border);
  padding: 5.5rem 4rem;
  display: flex; align-items: center;
  justify-content: space-between; gap: 3rem;
}
.contact-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3.5vw, 3.8rem);
  font-weight: 400; line-height: 1.1;
}
.contact-heading em { font-style: italic; color: var(--accent); }
.contact-btn {
  display: inline-block; flex-shrink: 0;
  background: var(--accent); color: #fff;
  font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none;
  padding: 1rem 2.5rem; border-radius: 2px;
  transition: opacity .25s, transform .3s var(--ease);
  white-space: nowrap;
}
.contact-btn:hover { opacity: 0.82; transform: translateY(-2px); }

/* ── FOOTER ── */
#site-footer {
  border-top: 1px solid var(--border);
  padding: 1.6rem 4rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.74rem; color: var(--muted); letter-spacing: 0.04em;
}
#site-footer a { color: var(--muted); text-decoration: none; }
#site-footer a:hover { color: var(--accent); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(24,22,31,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.modal-overlay:not([hidden]) { opacity: 1; }
.modal-overlay[hidden] { display: none; }

.modal-container {
  background: var(--bg);
  border-radius: 8px;
  width: 100%; max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px);
  transition: transform .4s var(--ease);
  box-shadow: 0 32px 80px rgba(24,22,31,0.28);
}
.modal-overlay:not([hidden]) .modal-container { transform: translateY(0); }

.modal-close {
  position: sticky; top: 1rem;
  float: right; margin: 1rem 1rem 0 0;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 50%; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: var(--muted);
  cursor: pointer; z-index: 10;
  transition: background .25s, color .25s, border-color .25s;
}
.modal-close:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.modal-hero {
  width: 100%; aspect-ratio: 16/9;
  overflow: hidden; position: relative;
}
.modal-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.modal-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}

.modal-body { padding: 2.5rem 3rem 3rem; }
.modal-cat {
  font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: .6rem;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400; line-height: 1.1;
  margin-bottom: 1.2rem;
}
.modal-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem; }
.modal-content { font-size: 1rem; color: var(--muted); line-height: 1.85; }
.modal-content p + p { margin-top: 1rem; }
.modal-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 400; color: var(--ink);
  margin: 2rem 0 .6rem;
}
.modal-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 400; color: var(--ink);
  margin: 1.5rem 0 .5rem;
}

/* ── SCROLL REVEAL ── */
.ap-reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.ap-reveal.visible { opacity: 1; transform: none; }
.ap-reveal.delay-1 { transition-delay: .12s; }
.ap-reveal.delay-2 { transition-delay: .24s; }

/* ── KEYFRAMES ── */
@keyframes ap-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes ap-fadein { from { opacity: 0; } to { opacity: 1; } }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .project-card.featured { grid-column: span 2; }
}
@media (max-width: 900px) {
  #site-header { padding: 1.1rem 1.5rem; }
  .menu-toggle { display: flex; }
  #primary-nav {
    display: none; position: fixed; inset: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    flex-direction: column; align-items: center; justify-content: center;
    z-index: 199;
  }
  #primary-nav.open { display: flex; }
  #primary-nav ul   { flex-direction: column; gap: 2rem; text-align: center; }
  #primary-nav a    { font-size: 1.1rem; }
  #hero             { padding: 0 1.5rem 4.5rem; }
  .hero-watermark   { display: none; }
  #portfolio        { padding: 4rem 1.5rem 5rem; }
  .portfolio-grid   { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: span 1; grid-template-columns: 1fr; }
  #about   { grid-template-columns: 1fr; gap: 2.5rem; padding: 4rem 1.5rem; }
  #contact { flex-direction: column; align-items: flex-start; padding: 4rem 1.5rem; }
  #site-footer { flex-direction: column; gap: .6rem; padding: 1.4rem 1.5rem; text-align: center; }
  .modal-body  { padding: 1.75rem 1.5rem 2.5rem; }
}

/* WP alignment */
.alignleft   { float: left;  margin-right: 1.5rem; }
.alignright  { float: right; margin-left: 1.5rem; }
.aligncenter { display: block; margin: 0 auto; }
.wp-caption  { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: var(--muted); margin-top: .5rem; }
