/* =========================================
   1. RESET & BASE
   ========================================= */
:root {
   /* Font Families */
   --font-display: 'Cinzel', serif;              /* untuk judul besar */
   --font-heading: 'Cormorant Garamond', serif;  /* untuk heading section */
   --font-body: 'Noto Serif', serif;             /* untuk body text */
   --font-ui: 'Inter', sans-serif;               /* untuk navigasi dan UI */
  
   /* Colors */
   --color-bg: #e7e7e7;            /* paper rotan untuk background utama #E0D5C5*/
   --color-nav: #F5F0E8;           /* warm white untuk nav */
   --color-nav-bar: #1A1614;       /* black untuk nav bar */
   --color-text: #1A1614;          /* black */
   --color-text-secondary: #4A4038;/* dark gray */
   --color-text-muted: #7B6D60;    /* gray */
   --color-white: #F5F0E8;         /* warm white untuk card */
   --color-black: #2A2420;         /* warm black untuk accent */

   /* Button colors */
  --btn-primary-bg: #2A2420;           /* Warm black - primary action */
  --btn-primary-hover: #3A3430;        /* 10% lighter on hover */
  --btn-primary-active: #1A1614;       /* 10% darker on active */
  --btn-primary-text: #FFFFFF;         /* White - max contrast */
  
  --btn-secondary-bg: transparent;     /* Outline style */
  --btn-secondary-border: #B5A595;     /* Warm taupe - visible but subtle */
  --btn-secondary-hover: #F5F0E8;      /* Warm white fill on hover */
  --btn-secondary-text: #2A2420;       /* Same as primary text */
  
  --btn-disabled-bg: #E0D5C5;          /* Muted for disabled state */
  --btn-disabled-text: #8B7D70;        /* Low contrast = not interactive */
  
  --btn-focus-ring: #2A2420;           /* Accessible focus indicator */

}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Agar anchor tidak tertutup nav sticky */
}

body.layout-home {
  background-color: var(--color-bg);
  background-image: url('/assets/images/homepage/homepage-texture-2.png');
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center center;
  overflow-x: hidden;
  text-align: left;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.75;
}

a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid #bbb;
}

a:hover {
  border-bottom-color: var(--color-black);
}


/* =========================================
   2. LAYOUT & CONTAINER
   ========================================= */
.home-tabloid {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 5% 2.5rem;
  text-align: left;
  box-sizing: border-box;
}


/* =========================================
   3. NAVIGATION
   ========================================= */
.site-navigation {
   background-color: var(--color-nav-bar) !important;
   background: #1A1614 !important;
   opacity: 1 !important;
   width: 100%;
   position: sticky;
   top: 0;
   z-index: 1000;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
   padding: 1rem 0;
   border-bottom: 1px solid #333;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav-link {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-nav);
  text-decoration: none;
  border-bottom: none !important;
  transition: color 0.2s, transform 0.2s;
}

.nav-link:hover {
  color: #D3AF37;
  transform: translateY(-1px);
}


/* =========================================
   4. MASTHEAD
   ========================================= */
.masthead {
  margin-bottom: 2rem;
  max-width: 100%;
  text-align: left;
}

.site-name {
   font-family: var(--font-display);
   font-size: 3rem;
   font-weight: 700;
   margin: 0 0 0.4rem 0;
   text-align: left;
   letter-spacing: 0.05em;
   text-transform: uppercase;
}

.site-desc {
   font-family: var(--font-ui);
   font-size: 1.1rem;
   font-weight: 400;
   margin: 0;
   color: var(--color-text-secondary);
   text-align: left;
}


/* =========================================
   5. OPENING & PROFILE
   ========================================= */
.opening {
   background: rgba(245, 240, 232, 0.8) !important;
   backdrop-filter: blur(4px) !important;
   -webkit-backdrop-filter: blur(4px) !important; /* support untuk Safari */
   border: 1px solid rgba(255, 255, 255, 0.3);
   padding: 2rem;
   border-radius: 8px;
   margin-top: 0;
   margin-bottom: 1rem;
}

.opening h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.opening h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 2.5rem 0 1rem;
}

.opening p {
   font-family: var(--font-body);
   font-size: 1.05rem;
   max-width: none;
   text-align: justify;
   margin-bottom: 1.2rem;
   line-height: 1.8;
   color: #2A2420;
}

/* Profile Container */
.profile {
   background: #F5F0E8 !important;
   background-color: #F5F0E8 !important;
   backdrop-filter: blur(4px) !important;
   padding: 2rem;
   margin-top: 4rem;
   border-left: 4px solid #B5A595;
   position: relative;
   z-index: 1;
   border-radius: 0;
   overflow: hidden;
}

.profile h2 {
   font-family: var(--font-heading);
   font-size: 2rem;
   font-weight: 900;
   margin: 0 0 1.5rem 0;
}

/* Profile Content */
.profile-content {
   display: flex;
   gap: 2rem;
   align-items: flex-start;
   width: 100%;
   background: transparent !important;
}

/* Kolom Teks Profile */
.profile-text {
   flex: 0 0 60%;
   max-width: 60%;
   min-width: 0;
}

.profile-text p {
   font-family: var(--font-body);
   font-size: 1.05rem;
   line-height: 1.8;
   margin-bottom: 1.6rem;
   text-align: left;
   color: #2A2420;
}

/* Kolom Foto Profile */
.profile-image {
   flex: 0 0 40%;
   max-width: 40%;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: flex-start;
}

.profile-image img {
   width: 100%;
   max-width: 100%;
   height: auto;
   aspect-ratio: auto;
   object-fit: contain;
   border-radius: 0;
   box-shadow:none;
   border: 0;
   transition: transform 0.3s ease;
}

.profile-image img:hover {
   transform: translateY(-4px);
}

/* Hashtags Container */
.profile .hashtags,
section.profile .hashtags,
.profile-text .hashtags {
   margin-top: 1.5rem;
   display: flex;
   flex-wrap: wrap;
   gap: 0.5rem;
}

.profile .hashtags code,
section.profile .hashtags code,
.profile-text .hashtags code {
   background: #2A2420 !important;
   color: #FFFFFF !important;
   font-family: var(--font-ui) !important;
   font-size: 0.85rem !important;
   font-weight: 700 !important;
   text-transform: lowercase !important;
   letter-spacing: 0.02em !important;
   padding: 0.4rem 0.8rem !important;
   border-radius: 20px !important;
   margin: 0 !important;
   border: none !important;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
   cursor: default !important;
   display: inline-flex !important;
   align-items: center !important;
   opacity: 1;
}

.profile .hashtags code,
section.profile .hashtags code:hover {
   transform: translateY(-4px) !important;
   color: #2A2420 !important;
   box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35) !important;
   background: #D3AF37 !important;
}


/* =========================================
   6. COLLECTIONS & FOOTER
   ========================================= */

/* FOOTER */
.footer {
   border-top: 1px solid #eee;
   margin-top: 4rem;
   padding: 2rem 0 1.5rem;
   text-align: center;
   background: rgba(255, 255, 255, 0.5);
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-link {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s;
}

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

.footer-copyright {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
  letter-spacing: 0.02em;
}


/* =========================================
   7. PROJECTS GRID & CARDS
   ========================================= */
.projects {
   margin-top: 2rem;
   overflow: hidden;
}

.projects h2 {
   font-family: var(--font-display);
   font-size: 2rem;
   font-weight: 900;
   letter-spacing: 0.12em;
   color: var(--color-text);
   margin-bottom: 1rem;
}

.projects-grid-wrapper {
   position: relative;
   width: 100%;
}

.projects-grid {
   display: flex;
   gap: 2rem;
   overflow-x: auto;
   overflow-y: hidden;
   scroll-snap-type: x mandatory;
   scroll-behavior: smooth;
   -webkit-overflow-scrolling: touch;
   padding: 0.5rem 0 0 0;

   /* Hide scroll bar */
   scrollbar-width: none; /* Firefox */
   -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scroll bar Chrome/Safari */
.project-grid::-webkit-scrollbar {
   display: none;
}

.project-card {
   flex: 0 0 100%; /* default: 1 card visible */
   max-width: 100%;
   background: #F5F0E8;
   border: 1px solid #C9B9A8;
   transition: transform 0.25s ease, box-shadow 0.25s ease;
   overflow: hidden;
   scroll-snap-align: start;
   scroll-snap-stop: always;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

/* Scroll Navigation Buttons */
.projects-nav {
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 1.5rem;
   margin-top: 0.5rem;
   margin-bottom: 1rem;
   padding: 0.5rem 0;
}

/* Scroll Progress Dots */
.scroll-progress-dots {
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 0.6rem;
   margin-top: 0.5rem;
   padding: 0;
   min-height: 20px
}

.scroll-dot {
   width: 8px;
   height: 8px;
   border-radius: 50%;
   background-color: rgba(181, 165, 149, 0.4);
   border: 1px solid rgba(181, 165, 149, 0.3);
   cursor: pointer;
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
   padding: 0;
   margin: 0;
   flex-shrink: 0;
}

.scroll-dot:hover {
  background-color: rgba(42, 36, 32, 0.5);
  transform: scale(1.2);
}

.scroll-dot.active {
   background-color: #2A2420;
   width: 12px;              /* ukuran saat active */
   height: 12px;
   border-radius: 50%;        
   border-color: #2A2420;
   transform: scale(1);
}

.scroll-dot.active:hover {
   background-color: #1A1614;
   transform: scale(1.2);
}

.scroll-btn {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 56px;
   height: 36px;
   background: rgba(42, 36, 32, 0.7);
   backdrop-filter: blur(8px);
   -webkit-backdrop-filter: blur(8px);
   border: 1px solid rgba(255, 255, 255, 0.2);
   border-radius: 8px;
   color: var(--color-text);
   cursor: pointer;
   transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
   padding: 0;
}

.scroll-btn:hover {
   color: #FFFFFF;
   background: rgba(42, 36, 32, 0.9);
   transform: scale(1.1);
   box-shadow: 0 4px 16px rgba(42, 36, 32, 0.3);
}

.scroll-btn:active {
   color: #FFFFFF;
   transform: scale(0.95);
}

.scroll-btn:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

.scroll-btn svg {
   width: 28px;
   height: 28px;
   stroke: currentColor;
}

.scroll-btn:disabled,
.scroll-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Pojects Thumbnail */
.project-thumbnail {
  width: 100%;
  height: 400px;
  background: #f9f9f9;
  overflow: hidden;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.project-content {
  padding: 2rem;
}

/* Project Header */
.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.project-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.3;
}

.project-title a {
  color: var(--color-text);
  border-bottom: 1px solid #bbb;
  transition: border-color 0.2s;
  display: inline;
}

.project-title a:hover {
  border-bottom-color: var(--color-black);
}

/* Tags Inline */
.project-tags-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 0.5rem;
}

.tag-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-white);
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tag-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}

.tag-badge:nth-child(1) {
  background: linear-gradient(135deg, #FF9A00 0%, #FF5E00 100%);
  box-shadow: 0 2px 8px rgba(255, 94, 0, 0.25);
}
.tag-badge:nth-child(1):hover {
  box-shadow: 0 5px 14px rgba(255, 94, 0, 0.35);
}

.tag-badge:nth-child(2) {
  background: linear-gradient(135deg, #00D2C0 0%, #008B8B 100%);
  box-shadow: 0 2px 8px rgba(0, 139, 139, 0.25);
}
.tag-badge:nth-child(2):hover {
  box-shadow: 0 5px 14px rgba(0, 139, 139, 0.35);
}


/* =========================================
   8. DETAILS / SUMMARY TOGGLE
   ========================================= */
details.project-summary {
  margin-top: 1rem;
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

summary.summary-toggle {
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 0.5rem;
   font-family: var(--font-ui) !important;
   font-size: 1.05rem !important;
   line-height: 1.5 !important;
   color: var(--color-text-secondary);
   padding: 0.5rem 0;
   transition: color 0.2s;
}

summary.summary-toggle::-webkit-details-marker {
  display: none;
}

summary.summary-toggle:hover {
  color: var(--color-text);
}

.action-read {
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid #bbb;
  white-space: nowrap;
}

.action-read:hover {
  border-bottom-color: var(--color-black);
}

.close-wrapper {
  display: none;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.action-close {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #f9f9f9;
  transition: all 0.2s;
}

.action-close:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

/* Expanded States */
details[open] .summary-toggle .summary-text {
  display: none;
}

details[open] .action-read {
  display: none;
}

details[open] .summary-toggle {
  display: none;
}

details[open] .close-wrapper {
  display: flex;
}

.summary-content {
   padding-top: 0;
   font-family: var(--font-ui) !important;
   font-size: 1.05rem !important;
   color: #1A1614;
   line-height: 1.8 !important;
   animation: fadeIn 0.3s ease-out;
}

.summary-content p {
   width: 100% !important;
   max-width: none !important;
   margin-bottom: 1rem;
   font-family: var(--font-ui);
   color: #2A2420;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* =========================================
   9. BUTTONS & UTILITIES (OPTIMIZED)
   ========================================= */

/* Project Links Container */
.project-links {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  align-items: center;
}

/* Base Button Style */
.btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 0.5rem;
   padding: 0.65rem 1.2rem;
   font-family: var(--font-ui);
   font-size: 0.85rem;
   font-weight: 500;
   letter-spacing: 0.02em;
   text-decoration: none;
   border-radius: 6px;
   border: 1.5px solid transparent;
   cursor: pointer;
   transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
   white-space: nowrap;
   min-height: 44px;
}

/* Button Hover (Global) */
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(42, 36, 32, 0.15);
}

/* Button Active/Click */
.btn:active {
   transform: translateY(0);
   box-shadow: 0 2px 6px rgba(42, 36, 32, 0.1);
}

/* Button Focus (Accessibility) */
.btn:focus-visible {
  outline: 2px solid var(--btn-focus-ring);
  outline-offset: 2px;
}

/* Secondary Button (Outline Style) */
.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
}

.btn-secondary:hover {
  background: var(--btn-secondary-hover);
  border-color: #D3AF37;
  color: var(--btn-primary-bg);
}

/* Primary Button (Solid Style) */
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
  color: var(--btn-primary-text);
  box-shadow: 0 6px 16px rgba(42, 36, 32, 0.25);
}

.btn-primary:active {
  background: var(--btn-primary-active);
  border-color: var(--btn-primary-active);
}

/* Disabled State (Accessibility) */
.btn:disabled,
.btn.disabled {
  background: var(--btn-disabled-bg);
  color: var(--btn-disabled-text);
  border-color: var(--btn-disabled-bg);
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

/* Project Date */
.project-date {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #E0D5C5;
}

/* View All CTA */
.view-all {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #E0D5C5;
}

.view-all a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  border-bottom: 1px solid #C9B9A8;
  padding-bottom: 0.2rem;
  transition: all 0.2s;
}

.view-all a:hover {
  color: var(--color-black);
  border-bottom-color: var(--color-black);
}


/* =========================================
   10. RESPONSIVE (Desktop-First Cascade)
   ========================================= */
@media (min-width: 1200px) {
   .home-tabloid {
    padding: 2rem 3rem 2.5rem;
  }
   .projects-grid {
    gap: 3rem;
  }
   .project-content {
    padding: 2.2rem;
  }
   .projects-card {
     flex: 0 0 calc(33.33% - 1.33rem); /* tampilkan 3 card dengan gap */
     max-width: calc(33.33% - 1.33rem);
  }
}

@media (max-width: 900px) {
  .home-tabloid {
    padding: 2rem 2rem;
  }
  .projects-card {
     flex: 0 0 calc(50% - 1rem); /* tampilkan 2 card dengan gap */
     max-width: calc(50% - 1rem);
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 1.6rem;
    justify-content: center;
  }
  .masthead {
    padding-left: 1.6rem;
    padding-right: 1.6rem;
  }
  .site-name {
    font-size: 2.4rem;
  }
  .home-tabloid {
    padding: 1.5rem 1.6rem;
  }
  .opening {
    margin-bottom: 2rem;
    padding: 1.5rem;
  }
  .project-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .project-tags-inline {
    margin-top: 0.5rem;
    margin-left: 0;
  }
   .profile-content {
    flex-direction: column;
    gap: 1.5rem;
  }
  .profile-text,
  .profile-image {
     flex: 0 0 100%;
      max-width: 100%;
  } 
  .profile-image {
     order: -1;
     margin: 0 auto;  /* Pusatkan foto */
  }
  .profile-image img {
     max-width: 200px;  /* Foto lebih kecil di mobile */
  }
   .projects-nav {
    display: none;
  }
   .scroll-progress-dots {
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  .scroll-dot {
    width: 7px;
    height: 7px;
  }
  .scroll-dot.active {
    width: 14px;
  }
}

@media (max-width: 640px) {
  .nav-container {
    justify-content: center;
    gap: 1rem;
  }
  .footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
  }
  .footer-nav {
    gap: 1rem;
  }
  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .project-tags-inline {
     margin-left: 0;
     margin-top: 0.5rem;
  }
  .project-title {
     width: 100%;
  }
   .project-links {
    flex-direction: column;
    width: 100%;
    gap: 0.8rem;
  }
   .scroll-progress-dots {
    display: none;
  }
  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1rem;
  }
}

@media (max-width: 480px) {
  .home-tabloid {
     padding: 1.5rem 1.2rem;
  }
  .opening p {
     font-size: 1rem;
  }
  .opening {
     padding: 1.2rem;
  }
   .profile {
    padding: 1.5rem;
  }
  .profile-image img {
    max-width: 160px;  
  }
   .scroll-progress-dots {
    gap: 0.4rem;
  }
  .scroll-dot {
    width: 6px;
    height: 6px;
  }
  .scroll-dot.active {
    width: 12px;
  }
}
