:root {
    --bg-dark: #11100e;
    --paper: #e3d5b8;
    --gold: #c5a059;
    --gold-dim: #7a6336;
    --red-seal: #8a3324;
    --font-head: 'Cinzel', serif;
    --font-body: 'Space Mono', monospace;
}
/* Cinzel */
@font-face {
  font-family: 'Cinzel';
  src: url('../fonts/cinzel-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Cinzel';
  src: url('../fonts/cinzel-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

/* Space Mono */
@font-face {
  font-family: 'Space Mono';
  src: url('../fonts/spacemono-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Space Mono';
  src: url('../fonts/spacemono-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: 'Space Mono';
  src: url('../fonts/spacemono-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

/* RESET & BASE */
* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }
body {
    background-color: var(--bg-dark);
    color: var(--paper);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* --- BACKGROUND ANIMATION (RINGS) --- */
.bg-animation {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
}
.ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 1px dashed var(--gold);
    border-radius: 50%;
}
.ring-1 { width: 400px; height: 400px; animation: spin 20s linear infinite; }
.ring-2 { width: 600px; height: 600px; animation: spin 30s linear infinite reverse; border-style: solid; opacity: 0.5;}
.ring-3 { width: 800px; height: 800px; animation: spin 60s linear infinite; border: 1px dotted var(--gold); }

@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }

/* --- NOISE & CURSOR --- */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.07; pointer-events: none; z-index: 998;
}
.cursor-dot { width: 6px; height: 6px; background: var(--gold); position: fixed; border-radius: 50%; z-index: 9999; pointer-events: none; }
.cursor-outline { width: 30px; height: 30px; border: 1px solid var(--gold); position: fixed; border-radius: 50%; z-index: 9999; pointer-events: none; transition: transform 0.1s; }

/* --- LAYOUT UTILS --- */
.content-container {
    height: 88vh; /* Leave room for nav */
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto; /* Allow scroll inside content if needed */
    scrollbar-width: none; /* Hide scrollbar Firefox */
}
.content-container::-webkit-scrollbar { display: none; }

section { display: none; width: 100%; max-width: 900px; animation: fadeInUp 0.6s ease-out; }
section.active-section { display: block; }
.section-title {
    font-family: var(--font-head); color: var(--gold); font-size: 1rem;
    border-bottom: 2px solid var(--gold-dim); margin-bottom: 30px; padding-bottom: 10px;
    text-align: center; letter-spacing: 3px;
}

/* --- 1. HOME --- */
.hero-box { text-align: center; position: relative; }
.hero-title {
    font-size: 4rem; font-family: var(--font-head); color: var(--gold);
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.3);
    position: relative; display: inline-block;
}
.hero-subtitle { margin-top: 10px; font-style: italic; opacity: 0.8; letter-spacing: 1px; }
.floating-icons { margin: 30px 0; display: flex; justify-content: center; gap: 20px; font-size: 1.5rem; color: var(--gold-dim); }
.floating-icons i { animation: float 3s ease-in-out infinite; }
.floating-icons i:nth-child(2) { animation-delay: 0.5s; }
.floating-icons i:nth-child(3) { animation-delay: 1s; }

.antique-btn {
    background: transparent; border: 1px solid var(--gold); color: var(--gold);
    padding: 10px 30px; font-family: var(--font-body); text-transform: uppercase;
    transition: 0.3s; position: relative; overflow: hidden;
}
.antique-btn:hover { background: var(--gold); color: var(--bg-dark); box-shadow: 0 0 20px var(--gold); }

/* --- 2. JOBS (Grid) --- */
.job-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.job-card {
    border: 1px solid var(--gold-dim); padding: 20px; display: flex; align-items: center; gap: 15px;
    background: rgba(255, 255, 255, 0.02); transition: 0.3s; position: relative;
}
.job-card:hover { transform: translateY(-5px); border-color: var(--gold); background: rgba(197, 160, 89, 0.1); }
.job-icon { font-size: 2rem; color: var(--gold); min-width: 50px; text-align: center; }
.job-info h3 { font-family: var(--font-head); font-size: 1.1rem; }
.job-info span { display: block; font-size: 0.9rem; opacity: 0.8; }
.job-info small { color: var(--gold-dim); font-size: 0.8rem; }

/* --- 3. EDUCATION (Timeline) --- */
.timeline { position: relative; border-left: 2px solid var(--gold-dim); margin-left: 20px; padding-left: 30px; }
.timeline-item { margin-bottom: 30px; position: relative; }
.timeline-dot {
    position: absolute; left: -36px; top: 5px; width: 10px; height: 10px;
    background: var(--bg-dark); border: 2px solid var(--gold); border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-dark); /* Gap effect */
}
.timeline-content h3 { color: var(--gold); font-family: var(--font-head); margin-bottom: 5px; }
.timeline-content .date { font-size: 0.8rem; color: var(--gold-dim); border: 1px solid var(--gold-dim); padding: 2px 8px; border-radius: 4px; display: inline-block; margin-top: 5px; }

/* --- 4. GALLERY --- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-item {
    aspect-ratio: 1/1; position: relative; overflow: hidden; border: 1px solid var(--gold-dim);
    filter: sepia(0.6) grayscale(0.5); transition: 0.4s;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item:hover { filter: none; border-color: var(--gold); transform: scale(0.0); }
.overlay-text {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    opacity: 0; transition: 0.3s; font-weight: bold; background: rgba(0,0,0,0.7); padding: 5px 10px;
}
.gallery-item:hover .overlay-text { opacity: 1; }

/* --- 5. CONTACT --- */
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.input-group { position: relative; display: flex; align-items: center; border-bottom: 1px solid var(--gold-dim); }
.input-group i { color: var(--gold); margin-right: 10px; }
.input-group input, .input-group textarea {
    width: 100%; background: transparent; border: none; color: var(--paper);
    padding: 10px; font-family: var(--font-body);
}
.input-group input:focus, .input-group textarea:focus { outline: none; border-bottom: 1px solid var(--gold); }

/* --- NAV (HP STYLE) --- */
.bottom-nav {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(17, 16, 14, 0.95); border: 1px solid var(--gold);
    border-radius: 40px; padding: 10px 30px; display: flex; gap: 30px;
    z-index: 1000; box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}
.nav-item { font-size: 1.4rem; color: #555; transition: 0.3s; position: relative; padding: 5px; }
.nav-item.active { color: var(--gold); transform: translateY(-5px); }
.nav-item.active::after {
    content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; background: var(--gold); border-radius: 50%;
}

/* --- MODAL WATERMARK --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); justify-content: center; align-items: center; }
.modal-content-wrapper { position: relative; max-width: 90%; }
.modal-content {
  max-width: 100vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 2px solid var(--gold);
  box-shadow: 0 0 50px rgba(197, 160, 89, 0.2);
}

.watermark-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; display: flex; flex-direction: column; justify-content: center; align-items: center;
    overflow: hidden;
}
.watermark-overlay span {
    font-size: 4rem; font-family: var(--font-head); font-weight: 700;
    color: rgba(255, 255, 255, 0.15); transform: rotate(-30deg);
    margin: 20px 0; white-space: nowrap; text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.close-btn { position: absolute; top: 20px; right: 30px; font-size: 40px; color: var(--gold); z-index: 2001; }

/* ANIMATIONS */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* RESPONSIVE */
@media (max-width: 600px) {
    .hero-title { font-size: 2.5rem; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .bottom-nav { width: 90%; gap: 0; justify-content: space-between; padding: 15px 25px; }
}
.job-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.job-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.job-card {
  perspective: 1000px;
}

.job-card-inner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
}

/* FRONT */
.job-card-front {
  display: flex;
  align-items: center;
  gap: 15px;
  backface-visibility: hidden;
}

/* BACK */
.job-card-back {
  position: absolute;
  inset: 0;
  background: rgba(17, 16, 14, 0.97);
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: inherit;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  transform: rotateY(180deg);
  backface-visibility: hidden;
}

/* FLIP */
.job-card.flipped .job-card-inner {
  transform: rotateY(180deg);
}


/* ======================
   SKILL SECTION
====================== */
#skills {
    padding: 60px 20px;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.skill-card {
    border: 1px solid rgba(255,255,255,.1);
    padding: 25px;
    text-align: center;
    background: rgba(10,10,10,.7);
    transition: .3s ease;
}

.skill-card i {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 15px;
}

.skill-card h3 {
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.skill-card p {
    font-size: .85rem;
    opacity: .7;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 25px rgba(255,215,120,.15);
}

.school {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
}

.school-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  opacity: 0.75;
  filter: grayscale(100%);
}

.timeline-item:hover .school-logo {
  opacity: 1;
  filter: none;
}

/* ===== FLIP SECTION ===== */
.flip-section {
  perspective: 1600px;
  cursor: pointer;
}

.flip-inner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(.4,.2,.2,1);
}

.flip-section.flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-face {
  backface-visibility: hidden;
  width: 100%;
  min-height: 100%;
}

.education-back {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateY(180deg);
}

/* ===== SCHEDULE STYLE ===== */
.schedule-box {
  display: grid;
  /* KUNCI: Membagi persis menjadi 4 Kolom */
  /* 35px (Hari) | 1fr (Nama MK) | 75px (Jam) | 20px (Logo) */
  grid-template-columns: 35px 1fr 75px 20px; 
  column-gap: 8px;
  row-gap: 12px; /* Jarak atas-bawah jika ada 2 MK di hari yang sama */
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255,215,0,.25);
  border-radius: 8px;
  background: rgba(0,0,0,.45);
  font-size: .75rem;
  line-height: 1.2;
}

/* ===== FIX CENTER ALBUM ===== */
.gallery-back {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* pembungkus gambar */
.album-viewer {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* gambar album */
.album-viewer img {
  max-width: 85%;
  max-height: 70vh;
  object-fit: contain;
  margin: auto;
}
/* ===== COMPACT TEACHING SCHEDULE ===== */

.schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
}

.schedule-box {
  position: relative;
  padding: 6px 10px;
  border: 1px solid rgba(255,215,0,.25);
  border-radius: 8px;
  background: rgba(0,0,0,.45);
  font-size: .75rem;
  line-height: 1.15;
}


.schedule-box .day {
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 1px;
}
.schedule-box .course {
  display: block;
  opacity: .9;
}
.schedule-box .time {
  font-size: .7rem;
  opacity: .7;
  text-align: right; /* Agar jam sejajar rapi mendekati logo */
  white-space: nowrap;
}

/* icon kampus kecil */
.campus-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: .6;
  filter: grayscale(100%);
  justify-self: end; /* Mendorong logo mentok ke kanan */
}


/* ===== FLIP GALLERY ===== */
.flip-section {
  position: relative;
  perspective: 1600px;
}

.flip-inner {
  position: relative;
  width: 100%;
  min-height: 520px;
  transform-style: preserve-3d;
  transition: transform 0.9s ease;
}

.flip-section.flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 520px;
  backface-visibility: hidden;
}

.gallery-front {
  z-index: 2;
}

.gallery-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ===== ALBUM ===== */
.album-viewer img {
  max-width: 90%;
  max-height: 65vh;
  border-radius: 14px;
  box-shadow: 0 0 30px rgba(255,215,0,.25);
}

#visitorCounter {
  margin-top: 18px;
  text-align: center;
  font-size: .7rem;
  letter-spacing: 3px;
  opacity: .6;
}

