/* ============================================
   RINA PURWANTI — Premium Editorial Portfolio
   Enhanced — Richer Colors, Animations & Decor
   ============================================ */

:root {
  --bg: #FFFFFF;
  --bg-alt: #FAF9F7;
  --bg-warm: #FEF7F0;
  --text: #111827;
  --text-secondary: #6B7280;
  --text-dim: #9CA3AF;
  --accent: #991B1B;
  --accent-hover: #7F1D1D;
  --accent-light: #FEF2F2;
  --accent-subtle: #FEE2E2;
  --gold: #D97706;
  --gold-light: #FEF3C7;
  --border: #E5E7EB;
  --gradient-accent: linear-gradient(135deg, #991B1B, #D97706);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
  --container: 1120px;
  --section-pad: clamp(88px, 12vh, 160px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s ease;
}
a:hover { color: var(--accent-hover); }

strong { font-weight: 600; }

::selection {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* ============================================
   PAGE LOADING ANIMATION
   ============================================ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  text-align: center;
}

.loader-logo {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--text);
  display: block;
  margin-bottom: 24px;
  animation: loader-pulse 1.2s ease-in-out infinite;
}

@keyframes loader-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.loader-bar {
  width: 120px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-progress {
  height: 100%;
  width: 0%;
  background: var(--gradient-accent);
  border-radius: 2px;
  animation: loader-fill 1s ease forwards;
}

@keyframes loader-fill {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* Prevent scroll during load */
body.loading {
  overflow: hidden;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.serif { font-family: var(--serif); }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s ease;
}

.nav.scrolled {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--text);
  transition: color 0.2s ease;
}
.nav-logo:hover { color: var(--text); }
.logo-dot {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.25s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.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: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   HERO — Enhanced
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 32px 80px;
  position: relative;
  background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg) 70%);
  overflow: hidden;
}

/* Decorative blobs */
.hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.hero-blob--1 {
  width: 500px;
  height: 500px;
  background: rgba(153, 27, 27, 0.07);
  top: 5%;
  right: 5%;
  animation: blob-drift 14s ease-in-out infinite alternate;
}

.hero-blob--2 {
  width: 350px;
  height: 350px;
  background: rgba(217, 119, 6, 0.06);
  bottom: 15%;
  left: 10%;
  animation: blob-drift 10s ease-in-out infinite alternate-reverse;
}

.hero-blob--3 {
  width: 250px;
  height: 250px;
  background: rgba(153, 27, 27, 0.05);
  top: 50%;
  left: 55%;
  animation: blob-drift 18s ease-in-out infinite alternate;
}

@keyframes blob-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-20px, 15px) scale(1.08); }
}

/* Decorative ring */
.hero-ring {
  position: absolute;
  width: 400px;
  height: 400px;
  border: 1px solid rgba(153, 27, 27, 0.06);
  border-radius: 50%;
  top: 15%;
  left: 8%;
  animation: ring-spin 40s linear infinite;
}

@keyframes ring-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  animation: fade-up 0.8s ease both;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 11vw, 9rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 32px;
  animation: fade-up 0.8s ease 0.15s both;
}

.hero-name-accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-location {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
  animation: fade-up 0.8s ease 0.3s both;
}

.hero-scroll {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fade-up 0.8s ease 0.45s both;
}

.scroll-text {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.15); }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--section-pad) 0;
  position: relative;
}

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

/* Decorative gradient line between sections */
.section--alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-subtle), var(--gold-light), var(--accent-subtle), transparent);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.section-label--light {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.12);
}

.section-title {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
}

.section-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   ABOUT — Enhanced photo
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: center;
}

.about-photo-wrap {
  position: relative;
}

.about-photo-accent {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 20px;
  top: 16px;
  left: 16px;
  opacity: 0.12;
  transition: transform 0.4s ease;
}

.about-photo-wrap:hover .about-photo-accent {
  transform: translate(4px, 4px);
}

.about-photo {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.08);
  aspect-ratio: 3 / 4;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.about-photo:hover img {
  transform: scale(1.04);
}

.about-text .section-label { margin-bottom: 16px; }

.about-lead {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 24px;
  font-weight: 400;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 0.95rem;
  line-height: 1.8;
}
.about-text p:last-child { margin-bottom: 0; }

/* ============================================
   EXPERIENCE — Enhanced
   ============================================ */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.exp-item {
  display: flex;
  gap: 28px;
  padding: 28px;
  border-radius: 16px;
  background: var(--bg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.exp-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}

.exp-num {
  font-family: var(--serif);
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
  min-width: 60px;
  padding-top: 4px;
  opacity: 0.5;
}

.exp-body { flex: 1; }

.exp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.exp-role {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.exp-company {
  font-size: 0.9rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.exp-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-accent);
  padding: 4px 14px;
  border-radius: 100px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.exp-duration {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-alt);
  padding: 4px 14px;
  border-radius: 100px;
}

.exp-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 14px;
}

.exp-desc {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.75;
  margin-bottom: 16px;
  max-width: 560px;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exp-tags span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-alt);
  padding: 4px 14px;
  border-radius: 100px;
  transition: background 0.25s ease, color 0.25s ease;
}

.exp-tags span:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* ============================================
   SKILLS — Enhanced cards
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--bg-alt);
  border-radius: 16px;
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.07);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.skill-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.skill-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   CONTACT — Enhanced
   ============================================ */
.section--contact {
  background: linear-gradient(160deg, #0F0F0F 0%, #1A1412 40%, #1C1410 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Background decorations */
.contact-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.contact-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.contact-blob--1 {
  width: 600px;
  height: 600px;
  background: rgba(153, 27, 27, 0.1);
  top: -25%;
  right: -15%;
  animation: blob-drift 16s ease-in-out infinite alternate;
}

.contact-blob--2 {
  width: 400px;
  height: 400px;
  background: rgba(217, 119, 6, 0.06);
  bottom: -20%;
  left: -10%;
  animation: blob-drift 12s ease-in-out infinite alternate-reverse;
}

.contact-grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Top gradient line */
.section--contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--gold), var(--accent), transparent);
  opacity: 0.4;
  z-index: 2;
}

.contact-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.contact-title {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}

.contact-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(135deg, #FCA5A5, #FCD34D);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-subtitle {
  color: rgba(255,255,255,0.5);
  margin-bottom: 44px;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Contact cards grid */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto 36px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  color: #fff;
  text-align: left;
  transition: all 0.3s ease;
}

.contact-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(153, 27, 27, 0.25);
  transform: translateX(6px);
  color: #fff;
}

.contact-card-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
}

.contact-card-body {
  flex: 1;
  min-width: 0;
}

.contact-card-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 2px;
}

.contact-card-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  color: #fff;
}

.contact-card-arrow {
  font-size: 1rem;
  color: rgba(255,255,255,0.2);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.contact-card:hover .contact-card-arrow {
  transform: translateX(4px);
  color: #FCA5A5;
}

/* CTA tagline */
.contact-cta {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.25);
}

/* ============================================
   FOOTER — Enhanced
   ============================================ */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-right {
  display: flex;
  gap: 28px;
  padding-top: 4px;
}

.footer-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.2s ease;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gradient-accent);
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: var(--text);
}

.footer-link:hover::after {
  width: 100%;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--text);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(153, 27, 27, 0.25);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 36px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .nav-links.open { opacity: 1; pointer-events: all; }
  .nav-links a { font-size: 1.2rem; }
  .nav-toggle { display: flex; z-index: 1001; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-photo { max-width: 300px; margin: 0 auto; }
  .about-photo-accent { display: none; }

  .exp-item {
    flex-direction: column;
    gap: 8px;
    padding: 20px;
  }
  .exp-num { font-size: 2.5rem; min-width: unset; }
  .exp-head { flex-direction: column; gap: 6px; }

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

  .hero-ring { display: none; }

  .hero-name { margin-bottom: 24px; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-name { font-size: clamp(2.8rem, 14vw, 4rem); }
  .exp-tags { gap: 6px; }
}
